[gdal-dev] gdal2cesium for python3

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[gdal-dev] gdal2cesium for python3

Idan Miara

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):

gdal-dev mailing list
[hidden email]

gdal2cesium.py (63K) Download Attachment