Geographic Information Systems Asked by meepit on December 10, 2020
I have two versions of Python gdal running in different environments. One is slightly older (2.1.1) and gdal.Warp seems to work just fine there, the newer version doesn’t. Has anyone else had this problem?
Edit:
I’m calling gdal.Warp like this:
gdal.Warp(output_raster, input_raster, dstSRS='EPSG:3083')
Error traceback, in the env with the newer version, looks like this:
runfile('C:/Users/mrt2594/clip&reproj_GRACE_TX.py', wdir='C:/Users/mrt2594')
Traceback (most recent call last):
File "<ipython-input-7-b1b650156b3c>", line 1, in <module>
runfile('C:/Users/mrt2594/clip&reproj_GRACE_TX.py', wdir='C:/Users/mrt2594')
File "C:Anacondaenvsosgeo-lablibsite-packagesspyder_kernelscustomizespydercustomize.py", line 786, in runfile
execfile(filename, namespace)
File "C:Anacondaenvsosgeo-lablibsite-packagesspyder_kernelscustomizespydercustomize.py", line 110, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "C:/Users/mrt2594/clip&reproj_GRACE_TX.py", line 33, in <module>
gdal.Warp(out_savepath, src_tif, options = clip_specs)
File "C:Anacondaenvsosgeo-lablibsite-packagesosgeogdal.py", line 579, in Warp
return wrapper_GDALWarpDestName(destNameOrDestDS, srcDSTab, opts, callback, callback_data)
File "C:Anacondaenvsosgeo-lablibsite-packagesosgeogdal.py", line 3189, in wrapper_GDALWarpDestName
return _gdal.wrapper_GDALWarpDestName(*args)
TypeError: in method 'wrapper_GDALWarpDestName', argument 4 of type 'GDALWarpAppOptions *'
Deleting all the packages from the environment and reinstalling only the bare minimum (python, gdal and their dependencies) seems to have worked - must have been some dependency / compatibility issue.
Answered by meepit on December 10, 2020
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP