2

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 Sep 13 '15 at 18:53
1

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
pause
0

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

0

Thanks for the replies. 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! Thanks again, Janwillem

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.