4

I just learned that QGIS 2.18 has a Tile Server (XYZ) provider in the Browser Panel. I created a large tile map using gdal2tiles and I'm trying to load it. However, I'm not publishing the tiles through a web server instead, I though about reading the files strait from the disk. So, in the Tile Server url I used file:///I:/SUL/rapid_tms_utm21/{z}/{x}/{y}.png. The tiles do not load and I see the following error in the log panel: Tile request max retry error. Failed 3 requests for tile 13 of tileRequest 2 (url: file:///I/SUL/rapid_tms_utm21/6/19/38.png).

So, the questions are:

  1. Does QGIS Tile Server provider works with local files?
  2. Can I use the file:/// protocol? How?

I tried the following lines as the TMS Server address:

  • file:///I:/SUL/rapid_tms_utm21/{z}/{x}/{y}.png
  • file:///I/SUL/rapid_tms_utm21/{z}/{x}/{y}.png
  • I:/SUL/rapid_tms_utm21/{z}/{x}/{y}.png
  • I/SUL/rapid_tms_utm21/{z}/{x}/{y}.png
  • /I/SUL/rapid_tms_utm21/{z}/{x}/{y}.png
  • /I:/SUL/rapid_tms_utm21/{z}/{x}/{y}.png
  • file://I:/SUL/rapid_tms_utm21/{z}/{x}/{y}.png
  • file://I/SUL/rapid_tms_utm21/{z}/{x}/{y}.png

And the tiles work using the TileLayerPlugin

  • It does not works for me with file:///F:/Tiles/Topo/{z}/{x}/{y}.png, but using the WM(t)S.xml file it does. – AndreJ Nov 25 '16 at 16:29
  • 3
    ... and works with a local Apache server from ms4w, targetting to the tiles root folder. – AndreJ Nov 25 '16 at 16:52
  • @AndreJ So if I correctly create the GetCapabilties.xml file and place it in the top level of the tile files hierarchy, QGIS will correctly access those tiles off disk as if they were being served by an actual tile server application? – Joebocop Feb 16 '18 at 18:48
  • 1
    @Joebocop you can try on your own, I had no success without an Apache server. The TileLayerPlugin works for me without the Apache server (unless you zoom in and out heavily github.com/minorua/TileLayerPlugin/issues/29 ), but I don't know if it will be continued in QGIS 3. – AndreJ Feb 17 '18 at 10:32
  • See issue #35 on GitHub. Unfortunately, TileLayer (and hence the seamless integration of local {z}/{x}/{y} tiles) is currently not on schedule for QGIS 3. – fdetsch Mar 14 '18 at 7:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.