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.

Ian Turton
  • 81,417
  • 6
  • 84
  • 185
Ned Horning
  • 65
  • 1
  • 4
  • An XYZ file isn't a coverage, a cover is an old ArcINFO data storage type http://desktop.arcgis.com/en/arcmap/10.3/manage-data/coverages/what-is-a-coverage.htm 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 https://stackoverflow.com/questions/159521/text-editor-to-open-big-giant-huge-large-text-files about opening large files partially) – Michael Stimson Jun 04 '18 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 “https://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”.

    – Ned Horning Jun 05 '18 at 13:49
  • You could try running this script: https://raw.githubusercontent.com/klakar/QGIS_resources/master/collections/Geosupportsystem/python/qgis_basemaps.py. It automatically adds many useful XYZ layers. If the issue is user error, this should solve it. – csk Jun 05 '18 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. – Ned Horning Jun 05 '18 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. – Michael Stimson Jun 05 '18 at 22:37
  • I have the same Problem. I am using qgis 3.0.3 with win 7. – corinna Jun 06 '18 at 10:37
  • I had the same problem running QGIS 3.2.3-Bonn running on Windows 8.1 Pro. csk's script worked, and Ned Horning's comment below helped explain the mechanics. Thanks. – Volga89 Sep 30 '18 at 18:11

3 Answers3

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.

csk
  • 24,827
  • 3
  • 32
  • 70
  • 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: https://mt1.google.com/vt/lyrs=m&x=%7Bx%7D&y=%7By%7D&z=%7Bz%7D

    but this does not: https://mt1.google.com/vt/lyrs=m&x={x}&y={y}&z={z}

    – Ned Horning Jun 07 '18 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.

Wendos
  • 11
  • 1
-2

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

user104406
  • 319
  • 2
  • 4