Right now I am trying to tile a GTiff into tiles to be used for e.g. Leaflet (so Mercator).

I played around with MapTiler and gdal2tiles. I am not entirely happy with both. Gdal2Tiles seems to pixelate the tiles, when I compare them to the tif. MapTiler cannot read the tif (I removed a band, MapTiler does not like that - also I want to be able to run the thing on a server, without GUI).

I also heard about TileMill, but TileMill seems to be deprecated.

So, I was wondering if there is any suitable alternative for tiling a GTiff?

BTW: the approach should be capable to tile a GeoTIFF with world-wide coverage.

  • 1
    Recognise that Mercator projection cannot be used for world-wide coverage. It is limited to a bit over 85N and 85S, and there is no polar coverage. – BradHards Sep 17 '16 at 12:00
  • Give an example of source file and gdal2tiles command that leads to pixelated output – user30184 Sep 17 '16 at 14:02

You can try Qtiles - QGIS plugin to tile your tiff. See https://plugins.qgis.org/plugins/qtiles/ and http://gis-lab.info/qa/qtiles-eng.html


GDAL natively now supports mbtiles and geopackages and does not rely on gdal2tiles.py use GDAL_Translate or GDAL_WARP

However check out gdal2tiles_parallel.py it's awesome fast https://github.com/GitHubRGI/geopackage-python/blob/master/Tiling/gdal2tiles_parallel.py

  • Thanks for the hint to gdal2tiles_parallel, that looks very interesting. How would I create tiles fom a GTif using eiter GDAL_Translate or GDAL_WARP - compareable to gdal2tiles? – Robin Sep 18 '16 at 6:16
  • gdal2tiles_parallel.py is faster and adds all the zoom levels/overviews where gdal_translate and gdal_warp just do the lowest zoom level (equivalent 1:1) – GeospatialInformationTech Oct 17 '16 at 17:48
  • @Robin See gdal.org/frmt_mbtiles.html $ gdal_translate my_dataset.tif my_dataset.mbtiles -of MBTILES $ gdaladdo -r average my_dataset.mbtiles 2 4 8 16 – AndrewHarvey Sep 26 '18 at 8:00

Expanding on @GeospatialInformationTech's answer, with GDAL's native MBTiles support you can do:

$ gdal_translate my_dataset.tif my_dataset.mbtiles -of MBTILES
$ gdaladdo -r average my_dataset.mbtiles 2 4 8 16

You can then use mbutil to expand that MBTiles into files:

$ mb-util my_dataset.mbtiles tiles

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.