AW: [mapserver-users] Errors in trying to angle my labels.

Ron M rm_mapserv at cheapcomplexdevices.com
Thu Feb 12 20:38:20 EST 2009


Stephen Woodbridge wrote:
> Since you seem to be doing this in postgis, I think the way to do thie
> is something like this:
> 
> DATA "the_geom from (select
> (180/3.141592654*atan2((y(endpoint(the_geom))-y(startpoint(the_geom))),
>>> (x(endpoint(the_geom))-x(startpoint(the_geom))))) as angle, the_geom,
> ... from table ...) as foo using ..."
> 
> then you can do
> 
>    ANGLE [angle]
> 
> to use the value as an attribute column.

Very nice!  It works.  Thanks much.


More information about the mapserver-users mailing list