-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue in gdal.Grid called from python bindings #10317
Comments
Weird. It should not. radius1, radius2 or nodata (lower case) are not accepted parameters. They should be put inside the algorithm string. Cf:
There has been no change in the gdal.GridOptions() signature between 3.8.5 and 3.9.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What is the bug?
I have a python code using gda.Grid, in which some options are passed, The code used to work up to gdal 3.8.5, but since 3.9.0 there is a strange error:
File "/python/lib/python3.12/site-packages/osgeo/gdal.py", line 1974, in Grid
return GridInternal(destName, srcDS, opts, callback, callback_data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/osgeo/gdal.py", line 9075, in GridInternal
return _gdal.GridInternal(*args)
^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: in method 'GridInternal', argument 3 of type 'GDALGridOptions *'
The options are standard:
options = gdal.GridOptions(
algorithm='NEAREST',
radius1=range,
radius2=range,
nodata=-9999,
outputBounds=[xmin, ymax, xmax, ymin],
outputType=gdal.GDT_Byte,
width=x_diff,
height=y_diff,
zfield='clas_01',
creationOptions=['COMPRESS=DEFLATE', 'BIGTIFF=YES']
)
with all parameters correctly defined.
Steps to reproduce the issue
Versions and provenance
GDAL 3.9.0
installed in python version (via mamba install)
Additional context
No response
The text was updated successfully, but these errors were encountered: