[mapserver-dev] LABEL BUFFER behavior changes

Lime, Steve D (MNIT) steve.lime at state.mn.us
Wed Jul 19 09:52:29 PDT 2017

That’s a big commit… Might be easier to decide what the proper behavior should be. IMHO I think layer-level settings SYMBOLSCALE and SIZEUNITS should impact (for a label object) label size, outlinewidth, buffer and offset. I think those are the only measure-based parameters. Label minsize/maxsize could be used to bound any of the others by taking the ratio of the size/minsize and size/maxsize and applying it to the other parameter values.  I thought Thomas has done at least some of that in his implementation. So, setting SIZE=MINSIZE=MAXSIZE would effectively set constant values for buffer, outlinewidth and offset as well.


From: Tamas Szekeres [mailto:szekerest at gmail.com]
Sent: Tuesday, July 18, 2017 4:54 AM
To: Lime, Steve D (MNIT) <steve.lime at state.mn.us>
Cc: mapserver-dev at lists.osgeo.org
Subject: Re: [mapserver-dev] LABEL BUFFER behavior changes

I think this change is related to this commit:


Best regards,


2017-07-18 2:40 GMT+02:00 Lime, Steve D (MNIT) <steve.lime at state.mn.us<mailto:steve.lime at state.mn.us>>:
Since symbol scale is applied to the label size and corresponding symbols it seems reasonable to scale the buffer accordingly. The old computation seems insufficient too. Problem is that you can't control the min/max buffer size. That could lead to some odd behavior. Could use min/max labels sizes to constrain buffer values.

Did you happen to identify the commit that accompanied the change? There were some some broad label refactoring RFCs where this probably happened.

From: mapserver-dev <mapserver-dev-bounces at lists.osgeo.org<mailto:mapserver-dev-bounces at lists.osgeo.org>> on behalf of Tamas Szekeres <szekerest at gmail.com<mailto:szekerest at gmail.com>>
Sent: Monday, July 17, 2017 4:17:52 PM
To: mapserver-dev at lists.osgeo.org<mailto:mapserver-dev at lists.osgeo.org>
Subject: [mapserver-dev] LABEL BUFFER behavior changes

Hi Devs,

Was that intentional that the BUFFER paramerer for the label depends on SYMBOLSCALE in mapserver 7?

For mapserver 6.x the buffer has been calculated as follows (in mapdraw.c):

label_buffer = (labelPtr->buffer*image->resolutionfactor);

For mapserver 7.x we use this formula:

textSymbolPtr->label->buffer * textSymbolPtr->scalefactor

where textSymbolPtr->scalefactor is in fact the layer->scalefactor

According to the documentation the buffer should be interpreted in pixels so the 7.x behaviour is incorrect I think, where the buffer depends on the actual scale/zoom.

I'm not aware of an RFC which would explain this change.

Let me know if I missed anything in this regard.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20170719/fc85a162/attachment.html>

More information about the mapserver-dev mailing list