Non-clipped polygon annotation

Shawn Gervais project10 at PROJECT10.NET
Mon Dec 17 20:24:50 EST 2007


Steve,

Thanks for taking the time to comment :)

>  - I'd go with an easier to understand processing key, perhaps LABEL_PRE_CLIP?

Thanks. The processing key I used was more a placeholder than anything; 
I don't even know what to properly call the feature. "Label 
pre-clipping" sounds right.

>  - there are 2 places to apply this (for polygons), for ANNOTATION layers and for POLYGON layers

For all types of shapes within ANNOTATION layers? I agree it makes sense 
to do polygon shapes (and possibly lines, see below).

>  - should be implemented for LINE layers as well

Are there performance ramifications for doing this for LINE layers? I 
guess the amount of computation to label a line (I'm thinking of 
autofollow, specifically) would be the same if you were labelling a line 
zoomed way out, vs. labelling the same line at a closer zoom but still 
labelling over the entire shape (pre-clip).

> 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.

Sounds good; I'll make this change in a more production-ready version of 
the patch.

Should I submit a full RFC or will a Trac ticket be sufficient for this?

-Shawn



More information about the mapserver-dev mailing list