1

I’m working with a fresh install of QGIS 3.0.3 on Ubuntu 18.04 and am not able to get my XYZ Tiles to render. When I add an XYZ Tile to the Map View it doesn’t appear. When I look at the XYZ Tile properties they look normal, as if the coverage was part of the project. If the XYZ tile is the first coverage that I open in a new project the project projection is set to the tile’s projection.

Although it’s quite possible that it’s a user problem, I followed several tutorials and the process seems quite simple. Any suggestions on ways to fix this or troubleshoot are welcome.

7
  • An XYZ file isn't a coverage, a cover is an old ArcINFO data storage type desktop.arcgis.com/en/arcmap/10.3/manage-data/coverages/… How are you adding the XYZ? As a raster or as vector points? Do you know what coordinate system the XYZ is in? Can you give a sample of the first dozen or so rows in your question? (read stackoverflow.com/questions/159521/… about opening large files partially) Commented Jun 4, 2018 at 22:13
  • These are the steps: Right-click “XYZ Tiles” in the Browser then click on “New Connection”. In the window that opens I paste “mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}” into the URL text box and type “GoogleSatellite” in the Name text box. I click “OK” and “GoogleSatellite” appears under “XYZ Tiles”. To display the tile layer I double click on “GoogleSatellite” and it appears in the Layers list but it is not rendered in the map display window. CRS: EPSG:3857 Pseudo Mercator I’m not sure what you mean by: “Can you give a sample of the first dozen or so rows in your question”. Commented Jun 5, 2018 at 13:49
  • You could try running this script: raw.githubusercontent.com/klakar/QGIS_resources/master/…. It automatically adds many useful XYZ layers. If the issue is user error, this should solve it.
    – csk
    Commented Jun 5, 2018 at 18:25
  • Thanks for the script. That worked like a charm so I guess it is a user problem but I'd still like to know what I'm doing wrong. I notice the URLs are slightly difference but from the tutorials I gather that QGIS fills in the "{x}&y={y}&z={z}" portion of the URL I was using. Commented Jun 5, 2018 at 20:33
  • I see, I was thinking file-based XYZ. It wasn't clear from your question that the XYZ was a service, that's important information as it completely changes the context of your question. If the comment by @csk has helped you achieve your goal then perhaps csk would like to answer this thread. Commented Jun 5, 2018 at 22:37

3 Answers 3

3

The issue here was probably user error in the process of adding XYZ tiles. The issue was solved by running a python script to load the XYZ tiles.

Link to the python script: https://raw.githubusercontent.com/klakar/QGIS_resources/master/collections/Geosupportsystem/python/qgis_basemaps.py

The script was created by Klas Karlsson: https://twitter.com/klaskarlsson/status/972757121933733889

enter image description here

Paraphrased from this answer.

1
  • 1
    All of the tutorials I read suggest using links that include “x”, “y” and “z” between brackets “{}” and I am not able to use those URLs to create an XYZ Tile. The URLs in the python script work. For example, for Google Maps, this works: mt1.google.com/vt/… but this does not: mt1.google.com/vt/lyrs=m&x={x}&y={y}&z={z} Commented Jun 7, 2018 at 19:25
1

I was having the same issue, ran the python code and it wouldn't load still, but when I went to xyz properties > set map zoning to MGA 56 then now it rasterizes.

-2

Make sure you have a correct xyz tile path. See this tutorial: How to Add Google Maps Layers in QGIS for more explanation.

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.