[Qgis-user] SLD import stumbling

Bo Victor Thomsen bo.victor.thomsen at gmail.com
Mon Jul 16 06:18:38 PDT 2018


I have some SLD based styling used in GeoServer.

I sáve the SLD style description as a text file, import this file into QGIS
and it works (almostl) nicely....

However QGIS interprets this part of the SLD wrongly
"
*<ogc:Filter>*
*            <ogc:PropertyIsEqualTo matchCase="false">*
*              <ogc:PropertyName>underelement_kode</ogc:PropertyName>*
*              <ogc:Literal>10e-004</ogc:Literal>*
*            </ogc:PropertyIsEqualTo>*
*          </ogc:Filter>*

"
the literal '10e-004 ' is a string value and not scientific notation for
the decimal value 0.001

The ogc:literal value is interpreted as a decimal value ( 0.0001 )
resulting in the QGIS style rule part

"
*underelement_kode = 0.001*
"
instead of treating the value as a string,resulting in a rulepart like this:

"
*underelement_kode = '10e-004'*
"

Is there a method to force the SLD interpreter to treat the value as a
string ?

I have tried to change the <ogc:PropertyIsEqualTo> element to
<ogc:PropertyIsLike>
which resulted in  this rule part:

"
*underelement_kode LIKE '0.001'*
"
Not much better :-/

The last result tells me,that a solution mioght be something as a attrubute
to the
<ogc:Literal>10e-004</ogc:Literal> element - perhaps something like this:

<ogc:Literal *type=text* >10e-004</ogc:Literal>

Which, unfortunately, doesn't work

Has anyone a solution for this problem ?

Kind regards

Bo Victor Thomsen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20180716/42576c37/attachment.html>


More information about the Qgis-user mailing list