If the goals are:
- maintain only one copy of the styling for a given feature type
- display different versions of a feature depending on scale
then perhaps you could merge all feature versions of the same feature type
into a single table, with an attribute indicating the appropriate scale,
and then render that layer with a single SLD.
Since the scale is indicated by an attribute, the standard SLD
Min/MaxScaleDenominator elements can't be used, because they are static.
Instead, use a rule filter based on the current scale, as provided by the
"wms_scale_denominator" environment variable [1]. <PropertyIsBetween> is
one way to express this, or else use the "between" function.
This also allows having just a single copy of the styling for a feature,
applied at all desired scales (the rule filter can AND the valid scale
range conditions for a particular styling together).
[1]
http://docs.geoserver.org/stable/en/user/styling/sld-extensions/substitution.html#predefined-variables
On Fri, Sep 14, 2012 at 3:01 AM, Christian Weithoeft
<christ...@dashsoft.dk>wrote:
>
> Hi Christian
>
> >From another Christian on the other side of the world.
>
> Could you please elaborate a little on this. Being new to GeoServer I'm
> struggling to understand and use all the different aspects of layers, layer
> groups and styles.
>
> My task is to display different layers dependent on scale. Example could be
> cost-lines with different level of details used for different scales. Layer
> for 1:1.000.000 has fewer details than the corresponding layer for 1:50.000
> and so on.
>
> On the other hand I want to use the same style for the feature independent
> of scale. And I don't want to have to maintain the same style in a lot of
> different SLD's. (it always goes wrong at some point in maintenance,
> forgetting one in the update process)
>
> How can Layer group help me or rather can I use layer group to select the
> "correct" layer for display dependent on scale.
>
> The data are placed in a Oracle Spatial database. The data is presently in
> use in an MapInfo based web tool. And from design data has been split into
> separate tables for each feature/scale combination.
>
> I have the option of joining the data in one table and add a label to
> indicate which scale data is meant to describe. The data are not very
> dynamic, so data maintenance is a smaller issue.
>
> --
Martin Davis
OpenGeo - http://opengeo.org
Expert service straight from the developers.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users