Non-clipped polygon annotation
project10
project10 at PROJECT10.NET
Mon Dec 17 19:22:31 EST 2007
Hi devs,
I've implemented support for an item that was discussed on IRC last week
- annotating polygons based on their pre-clip shape. This gives fixed
label positioning for polygon layers without the need to precompute an
annotation point based on the polygon centroid.
Frank suggested that I commit my ideas to a proper RFC format, but I
wanted to first get some feedback from you guys.
The patch adds support for a NOCLIPANNO processing directive at the
layer level. If the processing option is enabled, it will copy the
polygon shape pre-clip and use that to determine annotation points. If
not given, the old behavior is used.
My initial implementation is at http://rafb.net/p/4wGaHV10.html
Some renders showing the behavior change:
http://project10.net/ms/normal.png - current behavior
http://project10.net/ms/normal-myissue.png - Why I didn't like the
current behavior. My labels get 'dragged around'.
http://project10.net/ms/annoclip-inview.png - Labeling of a polygon with
my change
http://project10.net/ms/annoclip-demo.png - If the map is panned, the
annotation point stays fixed, even though part of the shape it annotates
is now clipped.
http://project10.net/ms/annoclip-partials.png - It also plays nice with
partials.
More information about the mapserver-dev
mailing list