[MapServer-users] MapServer-users Digest, Vol 178, Issue 3

Thomas Ellett von Brasch Thomas.Ellett at kartverket.no
Wed Nov 9 00:00:14 PST 2022


I've now had time to look closer at the metatiles being generated, and unfortunately (or fortunately I suppose) it led me to my own error, an old seed job I still had running with a different metatile size set.

So I can at least confirm that mapcache seems to be behaving absolutely correctly regarding metatile generation.

Just to clarify the error for anyone reading the thread and having similar issues; I had defined an 8x8 metatile in the tileset in the mapcache configuration file, while using a 5x5 metatile in an old seeding job that is still running now and again. That caused labels to be clipped in some places where a 5x5 metatile intersected with an earlier generated 8x8 metatile.

Thanks again for looking into it and pointing me in the right direction Steve!

/Tom

----------------------------------------------------------------------

Message: 1
Date: Thu, 3 Nov 2022 14:32:55 +0000
From: Thomas Ellett von Brasch <Thomas.Ellett at kartverket.no>
To: Steve Lime <sdlime at gmail.com>
Cc: "mapserver-users at lists.osgeo.org"
        <mapserver-users at lists.osgeo.org>
Subject: Re: [MapServer-users] Clipped labels in mapcache/mapserver
        map
Message-ID:
        <OS4P279MB0486FA592179072C2D749992E0389 at OS4P279MB0486.NORP279.PROD.OUTLOOK.COM>

Content-Type: text/plain; charset="utf-8"

Thanks for taking a look Steve!

I wondered about the angle follow as well, but I?ve been hoping its not that as it?d be a real shame to have to lose those. And I?ve tried with both negative and positive values for map edge buffer, but it didn?t seem to make a difference, and I read somewhere (mapserver dcos I guess ?) that the absolute value is now used.

I?ll try recreating a single metatile and let you know what happens.

/Tom

Fra: Steve Lime <sdlime at gmail.com>
Sendt: torsdag 3. november 2022 14:57
Til: Thomas Ellett von Brasch <Thomas.Ellett at kartverket.no>
Kopi: mapserver-users at lists.osgeo.org
Emne: Re: [MapServer-users] Clipped labels in mapcache/mapserver map

VARSEL: Avsenderen er fra utenfra organisasjonen. V?r trygg p? innholdet f?r du trykker p? linker eller ?pner vedlegg. Er du i tvil tar du kontakt med IT Servicedesk.

So I checked a map here and found similar settings:

  *   label-level: PARTIALS FALSE,
  *   map-level metadata: "labelcache_map_edge_buffer" "-20"
  *   mapcache: <metabuffer>20</metabuffer>
I don't use the LABEL_NO_CLIP processing directive. The one obvious difference is the negative value for the map edge buffer - I know negative values were originally how that was specified but I thought we generalized that value some time ago.

I wonder if the "ANGLE follow" might be the cause - perhaps there's an error in the size computation of the rotated text - perhaps at different position values? Just guessing though.

The only way to easily debug/test is going to be examining a metatile that results in a clipped label. You could delete an affected tile and then let mapcache generate a replacement. You should be able to pick up the metatile WMS call from the logs.

--Steve

On Tue, Nov 1, 2022 at 8:25 PM Steve Lime <sdlime at gmail.com<mailto:sdlime at gmail.com>> wrote:
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<mailto: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://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fnorgeskart.no%2F%23!%3Fproject%3Dnorgeskart%26layers%3D1002%26zoom%3D11%26lat%3D6879652.31%26lon%3D167744.51&data=05%7C01%7CThomas.Ellett%40kartverket.no%7C7a8684e02d25402c719308dabdaa5a19%7C7f74c8a243ce46b2b0e8b6306cba73a3%7C0%7C0%7C638030836608821150%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Ppp59Dnz9kMrQASI3pZ8ydYTlWWk0qejRvbS2ialB8g%3D&reserved=0<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fnorgeskart.no%2F%23!%3Fproject%3Dnorgeskart%26layers%3D1002%26zoom%3D11%26lat%3D6879652.31%26lon%3D167744.51&data=05%7C01%7CThomas.Ellett%40kartverket.no%7C7a8684e02d25402c719308dabdaa5a19%7C7f74c8a243ce46b2b0e8b6306cba73a3%7C0%7C0%7C638030836608821150%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Ppp59Dnz9kMrQASI3pZ8ydYTlWWk0qejRvbS2ialB8g%3D&reserved=0>

(the 'Stor rar' and 'S' names in the centre of the map)

https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fnorgeskart.no%2F%23!%3Fproject%3Dnorgeskart%26layers%3D1002%26zoom%3D6%26lat%3D6440416.41%26lon%3D127931.07&data=05%7C01%7CThomas.Ellett%40kartverket.no%7C7a8684e02d25402c719308dabdaa5a19%7C7f74c8a243ce46b2b0e8b6306cba73a3%7C0%7C0%7C638030836608821150%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=xkIvX81jjijj9xPdZajPvUYdjMJwjD%2Fi19VMcy7wh2g%3D&reserved=0<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fnorgeskart.no%2F%23!%3Fproject%3Dnorgeskart%26layers%3D1002%26zoom%3D6%26lat%3D6440416.41%26lon%3D127931.07&data=05%7C01%7CThomas.Ellett%40kartverket.no%7C7a8684e02d25402c719308dabdaa5a19%7C7f74c8a243ce46b2b0e8b6306cba73a3%7C0%7C0%7C638030836608821150%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=xkIvX81jjijj9xPdZajPvUYdjMJwjD%2Fi19VMcy7wh2g%3D&reserved=0>

('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 ?

Thanks in advance!

Tom

------------------------------

End of MapServer-users Digest, Vol 178, Issue 3
***********************************************


More information about the MapServer-users mailing list