Feature request #9778

Support metatile and metabuffer for labels

Added by Semen Makhorkin over 10 years ago. Updated almost 6 years ago.

Status:Open
Priority:Normal
Assignee:-
Category:QGIS Server
Pull Request or Patch supplied:No Resolution:
Easy fix?:No Copied to github as #:18320

Description

When I seed cache for map with MapCache and setup metatile and metabuffer parameters, WMS server must be instructed not to put any labels inside metabuffer area, as otherwise this will result in truncated labels (for mapserver, this is the "labelcache_map_edge_buffer" "-10" metadata entry, along with label PARTIALS FALSE).
But in QGIS Server i cannot set similar options and get truncated lables in seeded cache.

History

#1 Updated by luca76 - over 10 years ago

  • Target version set to Version 2.4

When we print a large WMS layer with labels, they are always cut off. We have configured the mapserver with "labelcache_map_edge_buffer", but in order to work QGIS need to pass the metabuffer parameters when communcating with mapserver WMS server.

#2 Updated by Jürgen Fischer over 10 years ago

  • Target version changed from Version 2.4 to Future Release - High Priority

#3 Updated by Tudor Bărăscu about 8 years ago

One option that can help a lot here is to go in your project to the properties of each layer that has labels, go to labels, and in the upper right corner you have the "Automated placement settings" option.
Open that and uncheck "Show partial labels".

#4 Updated by Nikolay Lebedev about 8 years ago

A big +1 for this one! While QGIS Server doesn't support metatiles natively, you have to put some tiling solution like MapProxy or TileCache between a web server and a QGIS Server. Nginx has it's own effective cache, which can be used for caching tiles, but the major thing that prevents such a straightforward usage is lack of metatiling support in QGIS Server itself.

The challenging part here is to let QGIS Server know that a particular WMS GetMap request is actually a request for a tile, followed by subsequent tile requests for surrounding areas, not just a single request for getting a static image, or non-tiled request, etc. So that the whole metatile doesn't get rendered on every GetMap request just to cut out a single tile from it.
MapProxy sets locks for tiles within a metatile that is in process of rendering, so that those tiles get fetched from cache as soon as rendering is complete and thus minimising metatile rendering requests to the backend.

Maybe it makes sense to add a TMS (or XYZ) endpoint to QGIS Server with all WMS parameters in place, except bbox param replaced with {x}, {y}, {z}.

#5 Updated by Giovanni Manghi over 7 years ago

  • Easy fix? set to No

#6 Updated by Alexey T almost 6 years ago

May be the label placement algorithm should be determenistic? Then labels won't jump from place to place when rendering adjacent tiles.

Also available in: Atom PDF