[MapServer-users] Clipped labels in mapcache/mapserver map

Steve Lime sdlime at gmail.com
Tue Nov 1 18:25:56 PDT 2022


Have you tried a larger edge buffer? I suppose that’s tough to to test
given the randomness. I’ll check my settings on a similar setup when I’m in
the office tomorrow and let you know. It would be interesting to see the
corresponding metatile to see if the label is whole there. I wouldn’t think
so but having a reproducible test case would help immensely.

Anyone know how to compute a metatile URL for a given tile x/y/z?

—Steve

On Mon, Oct 31, 2022 at 10:16 AM Thomas Ellett von Brasch <
Thomas.Ellett at kartverket.no> wrote:

> Hi all,
>
>
>
> I'm really struggling to fix a longstanding issue with clipped labels in a
> couple of our wmts services.
>
> I've tried following the mapserver/mapcache docs and numerous variations
> of different attributes, but with no luck.
>
>
>
> The main problem bug fixing is that the issue seems to be quite random,
> just popping up here and there.
>
>
>
> Examples can be seen in these urls:
>
>
>
>
> https://norgeskart.no/#!?project=norgeskart&layers=1002&zoom=11&lat=6879652.31&lon=167744.51
>
>
>
> (the 'Stor rar' and 'S' names in the centre of the map)
>
>
>
>
> https://norgeskart.no/#!?project=norgeskart&layers=1002&zoom=6&lat=6440416.41&lon=127931.07
>
>
>
> ('Kristiansan' , which should be 'Kristiansand')
>
>
>
> I have "labelcache_map_edge_buffer" "10" in the mapfile and
> <metabuffer>10</metabuffer> set in the mapcache file.
>
>
>
> In the source WMS, the placenames layers are line layers (with very small
> line geometries used just to give curved lines) and the layers (we have
> several name layers for the different zoom levels, but they're all set up
> in the same way) look like (truncated):
>
>
>
> LAYER
>
> NAME "N100Stedsnavn"
>
> PROCESSING "CLOSE_CONNECTION=DEFER"
>
> PROCESSING "LABEL_NO_CLIP=True"
>
> TYPE LINE
>
>
>
>     CLASS
>
>       NAME "N100 Stedsnavn"
>
>       EXPRESSION ([fmx_rotation] != 0)
>
>       LABEL
>
>                   *PARTIALS FALSE*
>
>                 *ANGLE follow*
>
>                 ANTIALIAS TRUE
>
>                 FONT "verdana"
>
>                 SIZE [fontsize]
>
>                 COLOR [geodb_color]
>
>                 ENCODING "UTF-8"
>
>                   PRIORITY [fontsize]
>
>                 *FORCE FALSE*
>
>                   MINDISTANCE 50
>
>                  OUTLINECOLOR 254 254 254
>
>                  POSITION [horizontalalignment]
>
>                  TYPE TRUETYPE
>
>       END
>
>       TEXT "[textstring]"
>
>     END
>
> END
>
>
>
> And the tileset definition in the mapcache config file looks like:
>
>
>
> <tileset name="norgeskart_bakgrunn">
>
>         <source>norgeskart_bakgrunn</source>
>
>         <cache>norgeskart_bakgrunn</cache>
>
>         <metadata>
>
>             <title>Topografisk Norgeskart og dybdedata og svalbard minus
> matrikkel</title>
>
>            <abstract>Cache for Norgeskart</abstract>
>
>         </metadata>
>
>         <grid>googlemaps</grid>
>
>         <grid>utm33n</grid>
>
>         <format>PNG</format>
>
>         *<metatile>8 8</metatile>*
>
>         *<metabuffer>10</metabuffer>*
>
> </tileset>
>
>
>
> Is it possible the metatiles being used in the original seed job and later
> seeding jobs are different somehow?
>
>
>
> Given that the labelcache_map_edge_buffer is set (along with metabuffer)
> and we have PARTIALS FALSE in the mapfile, I didn't think that cut labels
> would be possible?
>
>
>
> Any thoughts or ideas would be great J
>
>
>
> Thanks in advance!
>
>
>
> Tom
>
>
>
>
>
> [image: cid:image001.jpg at 01D3A415.20CB4FE0]
>
> *Tom Ellett von Brasch*
> Sjefsingeniør
> *Geodatatjenester*
>
> Direkte: 32 11 84 73
>
> Mobil: 45806402
>
> E-post: thomas.ellett at kartverket.no
>
>
> Tlf. sentralbord: 32 11 80 00
> www.kartverket.no
>
>
>
>
> _______________________________________________
> MapServer-users mailing list
> MapServer-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20221101/4a7357dc/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.jpg
Type: image/jpeg
Size: 1605 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20221101/4a7357dc/attachment.jpg>


More information about the MapServer-users mailing list