1

I have a problem with displaying vector tiles in QGIS. I get the tiles from GeoServer with application/vnd.mapbox-vector-tile format enabled.

When I use the link to the tiles as a source for Mapbox GL JS, the data is displayed correctly

map.addSource("countries", {
          type: "vector",
          scheme: "tms",
          tiles: [
            "https://pushkino-maps.ru/geoserver/gwc/service/tms/1.0.0/ne:countries@EPSG:900913@pbf/{z}/{x}/{y}.pbf",
          ],
        });

Map on Mapbox GL JS with tiles from GeoServer

But when I try to connect the link via Vector Tiles in QGIS, the data is displayed in its place, only on the smallest zoom, on the other zooms it is not displayed correctly.

The data is the starting set of the geometry of the countries from GeoServer in projection 4326. In QGIS, the connected layer has a projection of 3857. Project projection 3857. QGIS. The smallest zoom with vector tiles QGIS. Any other zoom with vector tiles enter image description here

I tried to change the projection in the link to 3857:
https://pushkino-maps.ru/geoserver/gwc/service/tms/1.0.0/ne:countries@EPSG:3857@pbf/{z}/{x}/{y}.pbf
So the data is not displayed at all. The change to EPSG:4326 only led to other distortions.

I also tried downloading the source data, converting it to 3857, uploading it back to GeoServer and trying to display it. The result has not changed.

What am I doing wrong?

1 Answer 1

0

The original Vector tiles are displayed incorrectly due to projection difference. Not sure about the one you converted to 3857, as you do not provide the link. But in any case, you can use WFS from the same server instead of vector tiles. https://pushkino-maps.ru/geoserver/ne/wfs?service=WFS&version=1.0.0&request=DescribeFeatureType&typeName=ne%3Acountries_3857 Adding this works just fine.

5
  • WFS really works, but I would still like to figure out vector tiles. The link to the data in 3857 is: pushkino-maps.ru/geoserver/gwc/service/tms/1.0.0 /ne:countries_3857@EPSG:900913@pbf/{z}/{x}/{y}.pbf
    – Ilya
    Commented Jun 12 at 11:45
  • From layer properties: Coordinate Reference Systems Native SRS EPSG:3857 Declared SRS EPSG:3857 SRS handling Force declared
    – Ilya
    Commented Jun 12 at 11:57
  • The thing is that Geoserver does not support 3857. So even if you load it in 3857, it would not really work. It seems like in the newer versions of QGIS it might be possible to edit the CS of the vector tile layer, might be worth trying: docs.qgis.org/3.34/en/docs/user_manual/… Commented Jun 12 at 16:13
  • So, try to upgrade and then change the source CS to 4326 or 900913... Commented Jun 12 at 16:15
  • Unfortunately, none of the possible combinations of projections 4326, 3857 and 900913 were successful
    – Ilya
    Commented Jun 13 at 8:53

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.