[Geoserver-users] How to force feature layering question?

I have a layer that contains points. Some of these points have the exact same
lat/long. Is there a way to force one point to be displayed on top based on
some property of the point? For example my points have a status property. If
two points are at the same location (exact same lat/long), I'd like the
point with status=bad to be displayed on top of any point at the same
location with a status=good.

running GeoServer 2.0.2

thanks
--
View this message in context: http://old.nabble.com/How-to-force-feature-layering-question--tp28915851p28915851.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

is that not just the order they’r specified in the SLD ? (i assume you’re talking about a wms image)

-i

On 17 June 2010 17:26, Dan MacLeod <dan.macleod@anonymised.com> wrote:

I have a layer that contains points. Some of these points have the exact same
lat/long. Is there a way to force one point to be displayed on top based on
some property of the point? For example my points have a status property. If
two points are at the same location (exact same lat/long), I’d like the
point with status=bad to be displayed on top of any point at the same
location with a status=good.

running GeoServer 2.0.2

thanks

View this message in context: http://old.nabble.com/How-to-force-feature-layering-question–tp28915851p28915851.html
Sent from the GeoServer - User mailing list archive at Nabble.com.


ThinkGeek and WIRED’s GeekDad team up for the Ultimate
GeekDad Father’s Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

On Thu, Jun 17, 2010 at 11:26 AM, Dan MacLeod <dan.macleod@anonymised.com> wrote:

I have a layer that contains points. Some of these points have the exact same
lat/long. Is there a way to force one point to be displayed on top based on
some property of the point? For example my points have a status property. If
two points are at the same location (exact same lat/long), I'd like the
point with status=bad to be displayed on top of any point at the same
location with a status=good.

running GeoServer 2.0.2

Add the layer twice once with a good filter and once with a bad
filter. You could even do this with a single SLD file and two rules
with a filter each but as a quick and dirty solution I'd go with two
layers.

Ian
--
Ian Turton

Ian Turton ha scritto:

On Thu, Jun 17, 2010 at 11:26 AM, Dan MacLeod <dan.macleod@anonymised.com> wrote:

I have a layer that contains points. Some of these points have the exact same
lat/long. Is there a way to force one point to be displayed on top based on
some property of the point? For example my points have a status property. If
two points are at the same location (exact same lat/long), I'd like the
point with status=bad to be displayed on top of any point at the same
location with a status=good.

running GeoServer 2.0.2

Add the layer twice once with a good filter and once with a bad
filter. You could even do this with a single SLD file and two rules
with a filter each but as a quick and dirty solution I'd go with two
layers.

Single SLD, multiple feature type styles, each one having a selection rule. The first FTS will be fully drawn first, then the second, the
third, and so on

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Ivan Price ha scritto:

is that not just the order they'r specified in the SLD ? (i assume you're talking about a wms image)

Not exactly. In GeoServer each FeatureTypeStyle results in a separate
data scan.
For each feature loaded each rule is evaluated in order, then we move
to the next feature, and again we evaluate all rules, and so on.

The SLD spec is not really clear about what the exact behavior should
be. We went for the most efficient in a data streaming setup

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

If I understand you correctly - if I want to display features with a
status=bad last, I should setup my SLD with rules, first checking for
status= good then status=bad? This will force features with status=good to
be drawn first, the features with status=bad to be drawn last?

thanks

Andrea Aime-4 wrote:

Ian Turton ha scritto:

On Thu, Jun 17, 2010 at 11:26 AM, Dan MacLeod <dan.macleod@anonymised.com>
wrote:

I have a layer that contains points. Some of these points have the exact
same
lat/long. Is there a way to force one point to be displayed on top based
on
some property of the point? For example my points have a status
property. If
two points are at the same location (exact same lat/long), I'd like the
point with status=bad to be displayed on top of any point at the same
location with a status=good.

running GeoServer 2.0.2

Add the layer twice once with a good filter and once with a bad
filter. You could even do this with a single SLD file and two rules
with a filter each but as a quick and dirty solution I'd go with two
layers.

Single SLD, multiple feature type styles, each one having a selection
rule. The first FTS will be fully drawn first, then the second, the
third, and so on

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
View this message in context: http://old.nabble.com/How-to-force-feature-layering-question--tp28915851p28916115.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

In "pseudo-xml":

<FeatureTypeStyle>
<Rule for status=good/>
</FTS>
<FeatureTypeStyle>
<Rule for status=bad/>
</FTS>

FeatureTypeStyles are rendered in the order they appear in the SLD, Rules within a FTS are rendered in the order data comes from the database. The memory usage will increase for each FeatureTypeStyle in your style though, so try to avoid too many of them.

--
David Winslow
OpenGeo - http://opengeo.org/

On 06/17/2010 11:44 AM, dMacLeod wrote:

If I understand you correctly - if I want to display features with a
status=bad last, I should setup my SLD with rules, first checking for
status= good then status=bad? This will force features with status=good to
be drawn first, the features with status=bad to be drawn last?

thanks

Andrea Aime-4 wrote:
   

Ian Turton ha scritto:
     

On Thu, Jun 17, 2010 at 11:26 AM, Dan MacLeod<dan.macleod@anonymised.com>
wrote:
       

I have a layer that contains points. Some of these points have the exact
same
lat/long. Is there a way to force one point to be displayed on top based
on
some property of the point? For example my points have a status
property. If
two points are at the same location (exact same lat/long), I'd like the
point with status=bad to be displayed on top of any point at the same
location with a status=good.

running GeoServer 2.0.2
         

Add the layer twice once with a good filter and once with a bad
filter. You could even do this with a single SLD file and two rules
with a filter each but as a quick and dirty solution I'd go with two
layers.
       

Single SLD, multiple feature type styles, each one having a selection
rule. The first FTS will be fully drawn first, then the second, the
third, and so on

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users