Non-clipped polygon annotation

Steve Lime Steve.Lime at DNR.STATE.MN.US
Wed Dec 19 13:35:27 EST 2007

You tried running msPolygonLabelPoint() on the raw shape then? What was the issue?


>>> On 12/18/2007 at 1:40 PM, in message <4768221A.30700 at>, Shawn
Gervais <project10 at PROJECT10.NET> wrote:
>>  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