Bug report #9365
QGIS save as SLD style for graduated styled layer different from what it's shown in QGIS
|Affected QGIS version:||2.0.1||Regression?:||No|
|Operating System:||Linux||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||fixed/implemented|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||17965|
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:Name>1.0000 - 2.0000</se:Name>
<se:Title>1.0000 - 2.0000</se:Title>
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?
#2 Updated by Simon Oberhammer over 6 years ago
I have the same problem when exporting graduated styles to SLD. This issue boils down to this:
The first condition of a filter rule "fooproperty >= 0.000000 AND fooproperty <= 0.570000" is wrongly exported as "ogc:PropertyIsGreaterThan" instead of the correct "ogc:PropertyIsGreaterThanOrEqualTo".