[gdal-dev] gdal2cesium for python3

Idan Miara idan at miara.com
Thu Feb 15 07:35:11 PST 2018


Hi,

I'm trying to update gdal2cesium.py to use Python3 (using latest gdal from
QGIS3)
I made the following changes:
I ran 2to3
changed tabs to spaces,

Now it runs, but it gives the following error:

  File "gdal2cesium.py", line 969, in process_tile
    data = ds.ReadRaster(xoff=rx, yoff=ry, xsize=rxsize, ysize=rysize,
buf_xsize=wxsize, buf_ysize=wysize, band_list=list(range(1,
self.dataBandsCount + 1)))
  File
"C:\PROGRA~1\QGIS2~1.99\apps\Python36\lib\site-packages\osgeo\gdal.py",
line 1983, in ReadRaster
    resample_alg, callback, callback_data )
TypeError: Invalid Parameter


I'm not sure why do I get TypeError, as these parameters get their default
values:

resample_alg = GRIORA_NearestNeighbour,
callback = None,
callback_data = None):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20180215/30d5fcfb/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gdal2cesium.py
Type: application/octet-stream
Size: 47526 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20180215/30d5fcfb/attachment-0001.obj>


More information about the gdal-dev mailing list