[gdal-dev] gdaldem in python doesnt recognise addAlpha = True
Even Rouault
even.rouault at spatialys.com
Wed Feb 6 08:14:51 PST 2019
On mercredi 6 février 2019 08:17:03 CET Corina Tudorache wrote:
> Hi list,
>
> I have been trying to use gdaldem in python to set the background color to
> transparent. Unfortunately gdaldem doesnt recognise addAlpha = True, i get
> this error message:
> TypeError: DEMProcessingOptions() got an unexpected keyword argument
> 'addAlpha'
>
> ds = gdal.DEMProcessing(infile, outfile, 'color-relief', format = 'MEM',
> colorFilename = '/data/file.txt', addAlpha = True)
>
> Is there a way to fix this behaviour?
This was added in GDAL 2.3.0
As a workaround you can use the options= keyword and format its value with
what you would put on the gdaldem command line
Even
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the gdal-dev
mailing list