[mapserver-users] make labels fit in a polygon

Mark Volz MarkVolz at co.lyon.mn.us
Thu Aug 29 15:30:28 PDT 2013


Hello,

A year and a half ago I inquired about how to deal with labeling complex polygons.  The basic issue is that the center of the bbox does not always fall within the boundary of complex polygons.  At the time one of the developers mentioned that using the bbox is much faster than trying to fit a label inside of the polygon.  At the time I let the issue go, however I have been hearing more users complain about labels not fitting correctly on some of the labels.  Therefore I am wondering if this topic can be discussed again.

Within MapServer:
I agree that using the bbox for label points is much faster to compute than using the actual polygon geometry.  I wonder however if it would be possible to add a keyword to allow either the bbox or polygon boundary to determine the label position.  This way users could have a choice between speed or precision for label placement.

Outside of Mapserver:
Does anyone know of a script that could be used to pre-calculate label positions?

Thanks


Mark Volz
GIS Specialist



More information about the mapserver-users mailing list