Feature request #9778

Support metatile and metabuffer for labels

Added by Semen Makhorkin about 3 years ago. Updated 4 months ago.

Status:Open Start Date:03/13/2014
Priority:Normal Due date:
Assigned to:- % Done:

0%

Category:Mapserver (QGIS Server)
Target version:Future Release - High Priority
Platform: Resolution:
Platform version: Pull Request or Patch supplied:No
Status info: Tag:

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

Updated by luca76 - almost 3 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.

Updated by Jürgen Fischer over 2 years ago

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

Updated by Tudor Bărăscu 7 months 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".

Updated by Nikolay Lebedev 4 months 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}.

Also available in: Atom