[Mapserver-dev] Label rotation...
Stephen Woodbridge
woodbri at swoodbridge.com
Wed Aug 4 07:36:23 EDT 2004
Steve Lime wrote:
> Just ran into an issue with GD. I probably knew about it but never
> really considered it a problem until working on a specific issue
> recently. Anyway, GD interprets angles in a counter-clockwise fashion.
> So, if you take the letter 'A' and rotate it 90 degrees it points west
> instead of east. That's counter intuitive if you're used to compass
But exactly what is expected if you are used to vector algebra.
> bearings or if you're using labels for "pointing". The fix, for labels
> at least, is to simply negate the angle before passing to GD. What do
> folks think?
What angles are we talking about? Would this change mean that it would
change the sense of angle for all existing mapfiles? What happens to
people that have angles in their attribute fields?
> Note the docs are do not specify a rotation direction...
What about adding an optional CC and CCW argument to angles in the
mapfile with the default being the CCW like it is today. For example:
ANGLE 90
ANGLE 90 CC
ANGLE 90 CCW
or better because it would work with LABELANGLEITEM
ANGLE 90
ANGLE CC 90
ANGLE CCW 90
ANGLE CC
ANGLE CCW
Where the last two would be used anywhere a _____ANGLEITEM field is
specific.
or also add CC and CCW as trailing optional fields to _____ANGLEITEM like:
LABELANGLEITEM "myangles" [CC|CCW]
-Steve W.
More information about the mapserver-dev
mailing list