4

I have multi-CPU linux server, so I wonder what is the fastest parallel version of gdal2tiles.py ?

My Ubuntu version:

lsb_release -a
Description:    Ubuntu 12.04.5 LTS

How I install the package:

sudo apt-get install python-gdal

Package version:

apt-show-versions python-gdal
python-gdal/precise uptodate 1.10.0-1~precise2

And under /usr/bin/ I have gdal2tiles.py.

Does it make sense is to update python-gdal package > 1.10.0(maybe build newer version from source), where I can see changelog about gdal2tiles.py?

After some googling I found that there are some patched versions of original gdal2tiles.py and some parallel versions of gdal2tiles.py. So I wonder why this functionality is not included in official package?

If anyone point to stable and fast version of gdal2tiles.py I can run some benchmarks for community.

Here is my script that I use for benchmark using original single threaded gdal2tiles.py.

set -x # Dump each line of this script
set -e # Stop on first error

DATASET="my_dataset"
LEVELS_OF_DETAIL=19

time gdalbuildvrt -srcnodata "0,0,0" orthomaps/$DATASET/global.vrt orthomaps/$DATASET/orthophoto_*.tif

#Default gdal2tiles.py
GDAL_TO_TILES="/usr/bin/python /usr/bin/gdal2tiles.py"
time $GDAL_TO_TILES -z 0-$LEVELS_OF_DETAIL orthomaps/$DATASET/global.vrt default_gdal2tiles_$DATASET

What versions I have tried:

  1. Original version of gdal2tiles.py (single threaded).
  2. Patch from here to make original gdal2tiles.py parallel, produce missing tiles.
  3. Version from here (also parallel), produce missing tiles.
  4. Version from here (also parallel), I can't even run it.
  5. Maptiler, works well, but cost money.
  6. tiler-tools cause an error.

If creating a TMS tiles with parallel gdal2tilesis an issue, I can move to any other tile format which is supported in Cesium( by cesium tile provider) and have parallel tiler, any ideas?

Related questions:

Performance of google map tile creation processes

How to cut a 'tiled image' from a raster dataset using GDAL?

  • If using a GUI tool would be ok, you can try Maptiler (by the gdal2tiles.py developer, sadly not open source nor fully free) or Tilemill. I think, but I might be wrong, that the free QGIS plugin QTIles uses parallel processing as well. – bugmenot123 Jan 17 '17 at 15:16
  • Since you alluded to them: See this project for speed improvements, github.com/pramsey/gdal2tilesp features "Parallel processing, to use all available machine cores when generating tiles." This helped me immensely. My forked enhancements for WEBP here github.com/roblabs/gdal2tilesp – RobLabs Jan 19 '17 at 19:15
  • @RobLabs I have tried your version here is bugreport github.com/roblabs/gdal2tilesp/issues/4 , what version of gdal2tiles.py you was using originally? – mrgloom Jan 20 '17 at 13:02
  • I'm also interested in creating tiles in parallel. Tried gdal2tiles_parallel.py but that creates several empty tiles. For instance, my map cover a part of Brazil but the created tile cover the entire world and is full of blank PNGs. Is there away to skip tiles not covered by the original map? – Daniel May 4 '17 at 19:31
  • I was unsuccessfully attempting to install gdal2tiles and your step by step to install the vanilla version solved my problem. UPVOTED :) – tony gil Apr 22 '18 at 10:30

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.