I'm struggling on MapServer trying to create better and smoother background buffer around labels using GEOMTRANSFORM 'labelpoly' function documented here https://mapserver.gis.umn.edu/mapfile/geomtransform.html#labelpnt-and-labelpoly
CLASS
NAME "Chantiers forestiers"
TEXT "[type_travaux]$[situation]$ Du [date_debut] $ Au [date_fin]"
STYLE
COLOR 0 255 0
OUTLINECOLOR 0 0 0
END
LABEL
MAXSCALEDENOM 20000
FONT arial
TYPE truetype
SIZE 10
COLOR 0 0 0
POSITION AUTO
WRAP "$"
STYLE
OPACITY 80
GEOMTRANSFORM 'labelpoly'
COLOR 255 255 255
OFFSET 2 2
END
END
Any idea on how we could achieve this? (trying to achieve it on MapServer)
Minimal would be larger than 1px rectangle buffer (eg 5px)
Better would be rounded rectangle buffer which I was not able to achieve on QGIS yet
Best Answer
I fear that fine tuning the labelpoly option is not possible without touching the source code.
I believe that the desired result could be achieved if it was possible to apply a buffer to labelpoly
It is already possible to color the boundary of the labelpoly with OUTLINECOLOR but for my mind it does not make the result much nicer. I suggest to write mail to mapserver-users mailing list and introduce your problem. A minimal improvement might be to change the default padding of labelpoly into 3 or 5 pixels. With 1 pixel the box is rather cramped.