[gdal-dev] gdal 3.1.2: Unknown resampling method: 13.

Even Rouault even.rouault at spatialys.com
Wed Oct 6 05:00:19 PDT 2021


Martin,

I'm even surprised gdalconst.GRA_Sum was valid in GDAL 3.1.2, as it was 
added (in the Python bindings) only in 3.3.0 per 
https://github.com/OSGeo/gdal/pull/4604

But there were other issues that prevented it to work, which will be 
fixed per https://github.com/OSGeo/gdal/pull/4604

You can workaround by using command line style:

gdal.Warp(output_path, file, options='-t_srs EPSG:3035 -r sum -tr 1000 
1000')

Even

Le 06/10/2021 à 10:46, Martin Landa a écrit :
> Hi all,
>
> we have issue with using gdalconst.GRA_Sum. Calling Warp() with
> GRA_Sum leads to the error message below:
>
> gdal.Warp(output_path, file, dstSRS='EPSG:3035',
> resampleAlg=gdalconst.GRA_Sum,xRes=1000, yRes=1000)
>
> ERROR 5: Unknown resampling method: 13.
> File "/usr/lib/python3/dist-packages/osgeo/gdal.py", line 689, in Warp
> return wrapper_GDALWarpDestName(destNameOrDestDS, srcDSTab, opts,
> callback, callback_data)
> File "/usr/lib/python3/dist-packages/osgeo/gdal.py", line 4600, in
> wrapper_GDALWarpDestName
> return _gdal.wrapper_GDALWarpDestName(*args)
> TypeError: in method 'wrapper_GDALWarpDestName', argument 4 of type
> 'GDALWarpAppOptions *'
>
> Is it a bug or feature - GRA_Sum is not supported by Warp()?
>
> Thanks for clarification in advance, Martin
>
-- 
http://www.spatialys.com
My software is free, but my time generally not.



More information about the gdal-dev mailing list