Bug report #10076
SLD file generation
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | Symbology | ||
Affected QGIS version: | 2.2.0 | Regression?: | No |
Operating System: | win32 | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 18546 |
Description
we noticed that Qgis 2.2.0 (32-bit) on Windows generation SLD file is not compatible with Geoserver 2.3.4 (Linux) - attach a picture of the error validation.
In order to reproduce the error we send you the shape file (ESRI) zone_colorate.shp and SLD files generated by Qgis 2 and SLD edited the file manually (and properly validated by Geoserver)
Related issues
Associated revisions
History
#1 Updated by Andrea Aime over 8 years ago
I've checked, indeed the generated SLD is not compliant with the specification, this is the invalid bit repeated multiple times in the document:
<se:Rotation> <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"> <ogc:Literal>45</ogc:Literal> </ogc:Filter> </se:Rotation>
A filter can only be added at the top of the rule to select the features to be painted, the rotation element needs to contain an expression instead. This is the valid syntax:
<se:Rotation> <ogc:Literal>45</ogc:Literal> </se:Rotation>
#2 Updated by Andrea Aime over 8 years ago
So far I've tracked the rotation element generation here:
https://github.com/qgis/QGIS/blob/master/src/core/symbology-ng/qgssymbollayerv2utils.cpp#L2306
and inside it calls createFunctionElement which turns a QGis expression into a OGC filter instead of a OGC expression
#3 Updated by Andrea Aime over 8 years ago
- Status changed from Open to Closed
Fixed in changeset 1140437f5513b361227a608a46cebf94da1a1e05.