I´m trying to rebuild this SLD rule (the env part can be ignored)in QGIS 2.14:

<sld:PointSymbolizer uom="http://www.opengeospatial.org/se/units/metre">
                <sld:OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="file:./position.svg"/>
                  <ogc:Function name="env">

enter image description here


  • Is it correct to choose mapunits and 10 as size to fulfill the UOM metre definition?
  • Is the rotation convert correct by use the expression builder next to rotation -> choose edit and use "rot" + 3 as expression? (ros is the name of a postgres attribut)?
  • When choosing mapunits as SVG size the symbol gets also scaled in my layertree window when zooming in and out. How can I prevent this and show all symbols in layer-tree in one size?

The second argument in the ogc function "env" is a default value, so a better expression to use for rotation would be:

coalesce("ros", 3)

Ie, use "ros" where it exists, otherwise default to 3.

Re the symbol size in the layer tree - you can't change that. It will always scale to match the map.

|improve this answer|||||
  • Hi ndawson, thanks for your reply. But look there is also an add ogc:ADD shouldn´t the expression say "rot" + coalesce("rotation", 3) add rotation or 3 to rot (which is a postgis attribut)? further this env is variable substitution from geoserver (docs.geoserver.org/stable/en/user/styling/sld-extensions/…) I´m unsure if this makes sense with QGIS, maybe with QGIS Server? – t Book Aug 31 '16 at 6:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.