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

Some renders showing the behavior change: - current behavior - Why I didn't like the 
current behavior. My labels get 'dragged around'. - Labeling of a polygon with 
my change - If the map is panned, the 
annotation point stays fixed, even though part of the shape it annotates 
is now clipped. - It also plays nice with 

More information about the mapserver-dev mailing list