On 03/01/13 14:30, lysgaard wrote:
> I'm working on the Open Aviation Map project. 
> We're using Geoserver for styling via SDL. 
> There are several places one wants the map to scale it's detail level based 
> on the zoom level. 
>
> Take elevation contour lines. When zoomed in it makes sense to show 
> contour lines for maybe every 50th metres, but when zoomed out, 
> maybe just for every 300-500 metres. 
> I understand that it would be possible to hard code all this using 
> max scale denominator but this would be extremely tedious and wery 
> prone to error. Does there exist any smarter way. I guess I'm looking for 
> some way to do basic calculations in the style based on the scale
> denominator 
> and by that calculate the values i want height curves for. Maybe SLD is the
> wrong 
> way to do this altogether?
>
>
actually, you have the scale denominator as an environment variable in
SLD, see:
http://docs.geoserver.org/stable/en/user/styling/sld-extensions/substitution.html

you can use it for example in the following way:

        <ogc:Function name="env">
            <ogc:Literal>wms_scale_denominator</ogc:Literal>
            <ogc:Literal>500000</ogc:Literal>
        </ogc:Function>

where the second value is a fallback / default value


------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to