[mapserver-dev] Label placement issue

Stephen Woodbridge woodbri at swoodbridge.com
Wed Oct 7 06:22:06 PDT 2015

On 10/6/2015 6:36 PM, Tamas Szekeres wrote:
> Hi,
> It looks like the label placement it not working very well if we need to
> place labels on polygons that are long thin rectangles orientated on an
> angle. See the attachment as an example, where each polygon should have
> a single label at the center of the polygon.
> The problem is related to the implementation of msPolygonLabelPoint in
> mapprimitive.c
> <https://github.com/mapserver/mapserver/blob/branch-7-0/mapprimitive.c>
> where some kind of adjustment is happening when the label falls near to
> the polygon boundaries.
> Do we have a workaround to this problem or shouldn't we have an option
> to switch this correction off in the label definition?

Hi Tamas,

Does GEOMTRANSFORM (centroid([shape])) help for this specific case of 
long thin polygons?

-Steve W

More information about the mapserver-dev mailing list