[Mapserver-dev] Label rotation...

Paul Ramsey pramsey at refractions.net
Wed Aug 4 10:16:49 EDT 2004


Yes, I always considered the label behavior correct, because here in BC 
our toponymy comes with CCW label angles, so applying them directly gave 
me the "correct" looking results. If you invert the behavior then I have 
to negate all my input values before drawing :)

Unfortunately there is no standard here, people will definately have 
angles of both sorts. (And different start points for measurement too... 
start at north, or start at the positive X axis?)

P.

Stephen Woodbridge wrote:
> 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.
> 
> _______________________________________________
> Mapserver-dev mailing list
> Mapserver-dev at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-dev




More information about the mapserver-dev mailing list