[gdal-dev] Gdal2tiles gains parallel processing features

Grégory Bataille gregory.bataille at gmail.com
Fri Sep 29 08:50:11 PDT 2017


Hi all,

I just wanted to announce that after a few months of work (took long, I got
lazy), *gdal2tiles has gained parallel computing abilities*

It is now *on trunk*.

*A few things to know:*
- I took upon me to rewrite the script almost entirely to make it more
modular, testable, ...
- Because the rewrite + the pararellization are a big and risky work (since
there were no tests really), there is a new gdal2tiles_old.py script on
trunk to provide an easy "back-out" for people who would get into trouble
in their production
- The script continues to work in a single thread/process mode by default
- Actually, if you chose the default (or explicitely ask for 1 single
process), the script will not use any python multiprocessing library (which
have been known to be flaky). That should ensure that default behavior is
not disturbed.
- To activate parallel processing, you need to pass a new flag
*--processes=n*

*Risks:*
- It is a major rewrite but algorithms have been barely touched, only the
code organization/modularity.
- The new version is running on my company's production. It's mostly one
use case but we are tiling ~1000 geotiff (in any SRS), in RGB or grayscale,
to a mercator output. It uses python 2.7 (this is actually a mistake and
should move to python 3.5 next week). That use case at least works well.


I'm open to remarks if you have any.

Cheers

---
Gregory Bataille
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20170929/930e64b6/attachment-0001.html>


More information about the gdal-dev mailing list