Tuesday, June 01, 2010

Rotation in SLD and Esri

In ArcMap you can rotate point symbols geopgraphic and arithmatic. SLD/Geoserver rotates features in only one direction (geographic). So to get the arithmatic rotation in GeoServer (based on a field value) you should multiply the Esri-direction by -1:

<sld:Rotation>
<ogc:Mul>
<ogc:PropertyName>RICHTING</ogc:PropertyName>
<ogc:Literal>-1</ogc:Literal>
</ogc:Mul>
</sld:Rotation>

* <ogc:Mul> is the multiply implementation of SLD (all functions)

To get geographic rotation you have to add 90 degrees.

3 comments:

Anonymous said...
This comment has been removed by the author.
德慈美玉 said...
This comment has been removed by a blog administrator.
Bart van den Eijnden said...

Thanks Paul, this helped me get my rotation right for Mapserver as well:

DATA "SHAPE FROM (SELECT OBJECTID, -(GRADENHOEK) AS GRADENHOEK2, SHAPE FROM TOPOGRAFIE.dtb_pnt WHERE GRADENHOEK > 0) USING unique OBJECTID"