I have made a tile pyramid of a number of Dutch topographical maps using gdal2tiles. This gives apart from the tiles openlayers.html and tilemapresource.xml. The openlayers shows perfectly and correctly aligned with respect with the osm layer in a browser.

However, I would like to view them as a layer in QGIS. I have tried various things but to no avail. The nearest thing to something was using the tip in display tiles with no plugin inside QGIS. The example xml in web page works but when changing the server into file:///pdok/top25tiles/{z}/{x}/{y}.png I get an inconsistently colored screen. (I changed the projection to EPSG:3785 both in gdal2tiles.py and in the xml)

The gdal2tiles line is e.g.:

gdal2tiles3785.py -z 15 /pdok/TOP25raster_GEOTIFF/32-top25raster-2013.tif /pdok/top25tiles

QGIS is 2.4.0, GDAL is 1.11.2, Ubunto is 15.04

  • for pyramids in QGIS, I would suggest to use gdaladdo. Tiles are primarily used for servers. note that you can create internally tiled tif with -co TILED=YES (gdal_translate)
    – radouxju
    Commented Sep 13, 2015 at 18:53

3 Answers 3


I display may self-tiled Dutch cadastral maps in QGIS with the TileLayers Plugin.

In the configuration file, you have to use tabs as delimiters:

Topo    Topo    file:///d:/Tiles/Topo/{z}/{x}/{y}.png   1   0   16  -180    -85.0   180.0   85.0

If you get strange-coloured tiles, you have to expand from paletted coloured source files to RGBA vrt files before starting the tiling:

for %%N in (D:\Karten\gdal\gdal2tiles\NL25\*.tif) DO gdal_translate -of vrt -expand rgba %%N D:\Karten\gdal\gdal2tiles\NL25\%%~nN.vrt
gdalbuildvrt -allow_projection_difference index25.vrt NL25\*.vrt
gdal2tiles --s_srs EPSG:28992 --zoom 15-16 index25.vrt tiles

In addition to AndreJ's suggestion, another way would be putting the tiles into a mbtiles archive and loading that as layer.


The TileLayers Plugin option I had already tried but results in "Failed to download all tiles". However, I added mb-util to my toolkit and that solved the problem. I had already worked with RasterLite (SpatiaLite) and that worked fine but rasterlite_load did not work on geotiffed historical maps (Bonnebladen) for some reason but this is perfect and fast.

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.