Tuesday, 20 December 2016

How to use QGIS tile server provider with local TMS folder


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




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...