Rich,

 Thanks for the info.  Now to figure out how to get
Mapserver to do the calcs...

Thanks!
Brent Fraser
GeoAnalytic Inc.
Calgary, Alberta

----- Original Message ----- 
From: "Richard Greenwood" <[EMAIL PROTECTED]>
To: "Brent Fraser" <[EMAIL PROTECTED]>
Cc: <MAPSERVER-USERS@lists.umn.edu>
Sent: Monday, August 20, 2007 4:05 PM
Subject: Re: How to calculate Azimuth from Angle in map
file?


> On 8/20/07, Brent Fraser <[EMAIL PROTECTED]> wrote:
> > 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
>
> Not sure if this will work in a map file, but the formula
I use to
> convert "mathematical" angles to azimuths is:
>
> azimuth = (450-m) - int( (450-m) / 360 ) * 360
>
> where "m" is the "mathematical" angle.
>
> -- 
> Richard Greenwood
> [EMAIL PROTECTED]
> www.greenwoodmap.com

Reply via email to