How to calculate Azimuth from Angle in map file?

Brent Fraser bfraser at GEOANALYTIC.COM
Mon Aug 20 17:28:19 EDT 2007


Mapservites,

    I've got shapefiles with angle values (0 degrees =
positive X axis,  increasing counter clockwise) but
Mapserver uses azimuths ( 0 = positive Y axis, increasing
clockwise) when rotating symbols.

  Is there any way to calculate azimuth from angle in the
map file?  I don't want to modify the dbf portions of the
shapefile if I don't have to; there's 13,000 of them, and I
may get updates so maintenance could be a pain.

  It would be nice if I could do something like:

      STYLE
       SYMBOL "pt_Building"
       ANGLE (90 - [angle])    # this doesn't work, so don't
try it!
       COLOR        80 80 80
      END

Any ideas?

Brent Fraser
GeoAnalytic Inc.
Calgary, Alberta



More information about the mapserver-users mailing list