Access window out of range in RasterIO()
I get following error when calling gdal2kml.create_kml(), as well as using the script from Bash
ERROR 5: chernarus_pol2_cubic_lzw.tif: Access window out of range in RasterIO(). Requested (13510,0) of size 965x1065 on raster of 14462x12778.
Traceback (most recent call last):
File "gdal2kml.py", line 204, in <module>
create_kml(source, dest, options.directory,
File "gdal2kml.py", line 129, in create_kml
bounds = create_tile(img, "%s/%s" % (directory, outfile), src_corner, src_size, quality)
File "gdal2kml.py", line 50, in create_tile
mem_ds.WriteRaster(0, 0, size[0], size[1], data, band_list=bands)
File "/usr/lib/python3/dist-packages/osgeo/gdal.py", line 2284, in WriteRaster
return _gdal.Dataset_WriteRaster(self,
TypeError: not a unicode string or a bytes
The issue can be mitigated for now with the 'crop' option for certain crop sizes, e.g. --crop=10