I am creating some sld's using QGIS for use in Geoserver and wanted to view the current zoom level so that I can then define it in the zoom level. Is this possible?
For example
<!-- Local Roads 1787 - 3573-->
<FeatureTypeStyle>
<Rule>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>State_cont</ogc:PropertyName>
<ogc:Literal>Y</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<MinScaleDenominator>1787</MinScaleDenominator>
<MaxScaleDenominator>3573</MaxScaleDenominator>
<LineSymbolizer>
<Stroke>
<CssParameter name="stroke">#CDAA66</CssParameter>
<CssParameter name="stroke-width">7</CssParameter>
<CssParameter name="stroke-linecap">round</CssParameter>
</Stroke>
</LineSymbolizer>
</Rule>
</FeatureTypeStyle>
<FeatureTypeStyle>
<Rule>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>State_cont</ogc:PropertyName>
<ogc:Literal>Y</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<MinScaleDenominator>1787</MinScaleDenominator>
<MaxScaleDenominator>3573</MaxScaleDenominator>
<LineSymbolizer>
<Stroke>
<CssParameter name="stroke">#FFFFFF</CssParameter>
<CssParameter name="stroke-width">6</CssParameter>
<CssParameter name="stroke-linecap">round</CssParameter>
</Stroke>
</LineSymbolizer>
<TextSymbolizer>
<Label>
<ogc:PropertyName>road_name2</ogc:PropertyName>
</Label>
<Font>
<CssParameter name="font-family">Arial</CssParameter>
<CssParameter name="font-size">10</CssParameter>
<CssParameter name="font-style">normal</CssParameter>
</Font>
<LabelPlacement>
<LinePlacement/>
</LabelPlacement>
<Halo>
<Radius>
<ogc:Literal>1</ogc:Literal>
</Radius>
<Fill>
<CssParameter name="fill">
<ogc:Literal>#FFFFFF</ogc:Literal>
</CssParameter>
<CssParameter name="fill-opacity">
<ogc:Literal>1</ogc:Literal>
</CssParameter>
</Fill>
</Halo>
<Fill>
<CssParameter name="fill">#000000</CssParameter>
</Fill>
<VendorOption name="followLine">true</VendorOption>
<VendorOption name="maxAngleDelta">30</VendorOption>
<VendorOption name="maxDisplacement">800</VendorOption>
<VendorOption name="repeat">1000</VendorOption>
</TextSymbolizer>
</Rule>
</FeatureTypeStyle>
<!-- Local Roads 3573 - 28573-->
<FeatureTypeStyle>
<Rule>
<ogc:Filter>
where
<!-- Local Roads
and
<MinScaleDenominator>3573</MinScaleDenominator>
<MaxScaleDenominator>28573</MaxScaleDenominator>
defines what to do at different zoom levels. I need QGIS to display the above scale denominator values.
Over 150k
30k-150k
<30k
TOC
The idea is to do rapid prototyping of different style options in QGIS and then export the SLD's to Geoserver for production. So people can zoom in out and turn on/off the relevant symbology. This would be easier if you can set zoom levels for different symbology from within the properties–>style tab like in arcgis. What I found for QGIS http://qgis.spatialthoughts.com/2012/02/styling-vector-data-in-qgis-using-size.html doesn't do the job as I want the layer turned on/off at different zoom levels.
Best Answer
Something you should try, which IMO is one of the cooler QGIS features, is the rule based rendering
If you export this as a SLD it will contain the style for each zoom level in a single SLD.
Note: You can't turn each rule on and off in the TOC but there is a feature request for that which hopefully might happen for 2.1.
Also Note: Labels can be done using the expression based labels using a
CASE WHEN..THEN
and the $scale variable but I don't know if that would export to SLD well.