[Qgis-developer] issue in exported SLD for categories symbology

Victor Olaya volayaf at gmail.com
Wed Nov 2 06:09:02 PDT 2016


It seems that there is an issue with SLD exports. When exporting
categorical symbology in which a default value is defined (for all
values not matching any of the categories) a rule-based symbology is
created. However, the default category has no ELSE in it (as it
should), and the default symbol is applied to all elements, since it
has no filter, and shadows the rest of the symbology.

Morever, when a rule-based symbology is defined as rule-based, and the
ELSE condition is added, it is not exported. The resulting SLD has
something like this:

         <!--Parser Error: syntax error, unexpected ELSE - Expression
was: ELSE-->
             <se:SvgParameter name="fill">#9a5ceb </se:SvgParameter>
             <se:SvgParameter name="stroke">#000001 </se:SvgParameter>
             <se:SvgParameter name="stroke-width">1</se:SvgParameter>
             <se:SvgParameter name="stroke-linejoin">bevel</se:SvgParameter>

Is that a known limitation, or is it like that for some reason?

For the record, the resulting SLD is correctly rendered in GeoServer,
so maybe there is some issue in how QGIS handles those default
categories. Opening the exported SLD and using it for a layer in QGIS
causes all feature to be rendered with the default symbol.

It might be related to this issue:



More information about the Qgis-developer mailing list