3

I am testing Vector Tiles display in QGIS 3.14 which is the first QGIS version to natively support this layer format. WMTS/TMS comes from GeoServer/GeoWebCache and is already tiled in Mapbox Vector Tile (.pbf) format. The tiled layer preview with OpenLayers displays the features just fine. However, QGIS seems to have trouble displaying them correctly. The features are severely misplaced/misscaled on the map. I have tried the following approaches (both specify CRS in url):

  1. Adding WMTS:

http://localhost:8080/geoserver/gwc/service/wmts?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&LAYER=leo:layer_1&TILEMATRIX=EPSG:2180:{z}&TILEMATRIXSET=EPSG:2180&FORMAT=application/vnd.mapbox-vector-tile&TILECOL={x}&TILEROW={y}

  1. Adding TMS:

http://localhost:8080/geoserver/gwc/service/tms/1.0.0/leo:layer_1@EPSG:2180@pbf/{z}/{x}/{-y}.pbf

Result is the same in both cases. I can pan and zoom and the tiles load correctly but the objects are significantly misplaced and misscaled. Their extent should be more or less similar to the polygon shown in the upper left corner.

How do I display Vector Tiled TMS/WMTS correctly in QGIS 3.14? Did I do something wrong or perhaps this QGIS feature is not fully functional yet? The CRS is EPSG:2180.

enter image description here

EDIT:

user30184 suggested to serve it in EPSG:3857. I tested tiles served in EPSG:3857, EPSG:4326 and my desired CRS - EPSG:2180. EPSG:3857 is the only one properly displayed in QGIS.

6
  • 1
    I had a try with a service that delivered tiles in EPSG:3857 and in some UTM zone. The tiles in Web Mercator were ok but UTM tiles were not. It can well be that I did something wrong. The development version 3.15 has some improvements in vector tiles if you can test that.
    – user30184
    Commented Oct 12, 2020 at 7:23
  • I tested it and EPSG:3857 is the only one that is displayed correctly at the moment. Guess I will wait with some more tests till 3.16 LTR is released. Commented Oct 12, 2020 at 8:22
  • Geoserver serves tiles by default in either WGS84 (EPSG:4326) or Web Mercator (EPSG:3857\EPSG:900913(Google web mercator)). QGIS looks for tiles in these schemes as they are most easily used. I recommend building your tile cache in Web Mercator which will be useful in both QGIS and web maps.
    – Dror Bogin
    Commented Oct 12, 2020 at 8:28
  • For my application I need EPSG:2180 specifically to preserve the shapes of my geometries. Sample OpenLayers app works correctly. Guess I will have to wait till it's implemented in QGIS as well. Commented Oct 12, 2020 at 8:36
  • I suppose that QGIS can fetch the tiles as EPSG:3857 and re-project vectors on-the-fly into the CRS of your project. Vector tiles does not preserve the coordinates of geometries accurately and small additional error due to transformation does not add much to that.
    – user30184
    Commented Oct 12, 2020 at 8:48

0

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.