Non-clipped polygon annotation

Shawn Gervais project10 at PROJECT10.NET
Tue Dec 18 14:40:10 EST 2007


> For some reason I remember being able to do this without doing a shape copy. I believe I intervened 
> before clipping and generated the label point and then referenced that point if a flag was set.
> Basically msPolygonLabelPoint() was run before the clip (if the processing key was set) and
> then not afterwards (or vice versa). I think you'd get better performance avoiding the copy.

Steve,

I have created ticket #2447 with my patch and the example images I gave 
in the earlier e-mail.

I tried to follow your suggestion - generate the label point before 
clipping. However, I ran into some issues related to "transforming" 
(msTransformShape()) the shape.

Seems that you need to run msTransformShape() before calls like 
msPolygonLabelPoint(), for them to determine sensible annotation points. 
However, once you transform the shape you can't clip it any longer - 
doing so will end up mangling the shape.

If you have suggestions on how I might do this without a shape copy I'd 
love to hear them. Like you say, for performance reasons I would rather 
avoid the shape copy if necessary.

-Shawn



More information about the mapserver-dev mailing list