[gdal-dev] [gdal2tiles.py] Crash if the asked tile level is from too high

Grégory Bataille gregory.bataille at gmail.com
Thu Jan 26 01:03:56 PST 2017


Hey all,

So if you try to launch gdal2tiles.py with an asked tile level that is from
very high, so that the output should be a single tile where not a single
pixel value of the original raster is displayed, gdal2tiles.py simply
crashes (stack trace) when trying to write nothing in the output file

What would you prefer as the "fixed" behaviour?
- some message is displayed on the stderr and then the script exits with a
non-zero exit code
- we generate a single empty (transparent tile) and complete successfully?


To reproduce, you can do this on trunk (with z = 10 or smaller)

> python gdal/swig/python/scripts/gdal2tiles.py
> autotest/pyscripts/data/test_bounds_close_to_tile_bounds_x.vrt
> /tmp/out_small -z 10 -v


(note that starting at a lower level and generating higher level tiles by
downsampling works and generates 1 empty tile --> maybe we should do the
same

> python gdal/swig/python/scripts/gdal2tiles.py
> autotest/pyscripts/data/test_bounds_close_to_tile_bounds_x.vrt
> /tmp/out_small -z 10 -v

)

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


More information about the gdal-dev mailing list