duplicate labels problem using mapserver ka-map

Jan Hartmann j.l.h.hartmann at UVA.NL
Thu Sep 28 05:30:15 EDT 2006


Instead of getCentroid, better use PointOnSurface: "Return a Point 
guaranteed to lie on the surface". This also tries to maximize the 
distance of the point to the surface boundaries.

Jan


Steve Lime wrote:
> Labeling tiled maps is a challenging problem. We have some ideas on how
> to improve things, but they are just ideas at this point. I think for
> now the only way to gaurantee 1 label would be to pre-compute a single
> label position and store that as a point layer. There a couple of ways
> to do that:
> 
>   - if you have Arcview or whatever you can typically save labels as a
> shapefile
>   - you could render the whole US as one relatively large image, and
> using MapScript could convert the label cache to a shapefile (converting
> pixel coordinates to map coordinates)
>   - if using PostGIS perhaps the getCentroid method would help although
> centroids are not always good label points
>   - in 4.10, MapScript has all the GEOS methods exposed which might be
> helpful
> 
> I'm sure others might have ideas too.
> 
> Steve
> 



More information about the mapserver-users mailing list