I'm working on recreating a base map style inspired from Mapbox Outdoors in QGIS. For this, I am using the Mapbox Terrain vector tileset as a Vector Tileset in QGIS. I can style features and add some labels, however I am encountering some issues with contour lines as they are served as polygons by Mapbox.

It seems that the contour lines themselves draw fine, as you can see below (the green lines).

contour lines in QGIS

However I am encountering issues when trying to label them with their correct elevation. It seems that QGIS doesn't merge the polygons across the different tiles and I am left with a bunch of labels on the border of each tile. This is staggering in the north part of the selected feature. I have tried buffer(collect_geometries($geometry), 0) but it doesn't seem to make any difference. Adding a text marker to the line rendering itself does work but it is far from ideal as there is little to no control on this.

  • If these are polygons as you suggest, have you tried dissolving (Processing Toolbox -> Vector Geometry -> Dissolve) the polygons by their elevation attribute (as a "Dissolve field") and checking if the labelling is better?
    – Sken2107
    Jun 8, 2022 at 10:11
  • Hi @Sken2107, thanks for the input. The source data is indeed polygons but as they are inside a vector tile layer they can't be used in any of the processing toolboxes I'm afraid. They are never fully loaded Jun 8, 2022 at 10:25
  • 1
    I am experiencing a similar problem when trying to visualize vector tiles. The problem was already stated when vector tiles were initially proposed for QGIS implementation (github.com/qgis/QGIS-Enhancement-Proposals/issues/162). Nov 2, 2022 at 16:29
  • 1
    similar problem here: gis.stackexchange.com/questions/426093/… Nov 2, 2022 at 16:49


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.