[gdal-dev] GDALDEMProcessingOptionsNew with NULL psOptionForBinary

jsherm jss5102 at gmail.com
Wed Apr 5 07:23:25 PDT 2017


Amusingly stumbled across this same problem this morning.  When working with
GDAL python 64 bit I cannot pass any altitude argument to
gdal.DEMProcessing() for hillshade.  Other arguments work fine, or if I set
the altitude argument = None it also functions.  However, I obviously would
prefer to use the altitude argument for hillshade.



Hillshade = gdal.DEMProcessing('hillshade.tif', DEM, 'hillshade',
combined=True, format = 'GTiff', altitude = 51, azimuth = 158)

returns the error:
Traceback (most recent call last):
  File "C:/DSWE_V2/DSWE_V2_P1_GDAL_distro_v2_dev.py", line 192, in <module>
    Hillshade = gdal.DEMProcessing('hillshade.tif', DEM, 'hillshade',
combined=True, format = 'GTiff', altitude = 51, azimuth = 158)
  File "C:\Python_64bit\lib\site-packages\osgeo\gdal.py", line 792, in
DEMProcessing
    return DEMProcessingInternal(destName, srcDS, processing, colorFilename,
opts, callback, callback_data)
  File "C:\Python_64bit\lib\site-packages\osgeo\gdal.py", line 2976, in
DEMProcessingInternal
    return _gdal.DEMProcessingInternal(*args)
TypeError: in method 'DEMProcessingInternal', argument 5 of type
'GDALDEMProcessingOptions *'

Thanks all
-Jake



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/gdal-dev-GDALDEMProcessingOptionsNew-with-NULL-psOptionForBinary-tp5315796p5315911.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.


More information about the gdal-dev mailing list