Bug report #9365

Updated by Andrea Aime almost 7 years ago

I've found that when applying a graduated style to a layer in QGIS, if I save the style as SLD to use it in my Geoserver, then the SLD rendered layer looks different.



So I've made a small example: !IMAGE 1!



The layer contains 4 elemtents, with a feature value that is 1,2,3,4 for each.



* First color style class represents values from 1 (included) to 2 (included)

* 2nd style class represents values > 2 and <= 3 (right?)

* 3td style class represents values > 3 and <= 4



but the Geoserver WMS rendered result with the same QGIS style saved as SLD is: !IMAGE 2!



where the polygon with feature value = 1 is missing. In fact the exported SLD contains instruction to style values > 1 and <= 2 for the first style class:



<se:Rule>

<se:Name>1.0000 - 2.0000</se:Name>

<se:Description>

<se:Title>1.0000 - 2.0000</se:Title>

</se:Description>

<ogc:Filter>

<ogc:And>

<ogc:PropertyIsGreaterThan>

<ogc:PropertyName>somedata</ogc:PropertyName>

<ogc:Literal>1</ogc:Literal>

</ogc:PropertyIsGreaterThan>

<ogc:PropertyIsLessThanOrEqualTo>

<ogc:PropertyName>somedata</ogc:PropertyName>

<ogc:Literal>2</ogc:Literal>

</ogc:PropertyIsLessThanOrEqualTo>

</ogc:And>

</ogc:Filter>

<se:PolygonSymbolizer>

<se:Fill>

<se:SvgParameter name="fill">#edf8fb</se:SvgParameter>

</se:Fill>

<se:Stroke>

<se:SvgParameter name="stroke">#000000</se:SvgParameter>

<se:SvgParameter name="stroke-width">0.26</se:SvgParameter>

</se:Stroke>

</se:PolygonSymbolizer>

</se:Rule>



and this can be a problem, as I need to hand modify all the SLD I'm producing with QGIS now. Also, the label shown in QGIS is not exported in the SLD as you can see the style do not render any layer label.

QGIS in use is 2.01 on Linux.



Is there a way to solve this?

Back