On mardi 31 octobre 2017 09:11:14 CET Rashad Kanavath wrote: > Thanks Jukka and Even for you reply. > > I am using otb to write gtiff image and using ExtendedFilename option in > otb, it allows me to pass creation options to gdal. > So for now, I write the image in otb without any extended filename stuff > and then add no_data by using GDALSetNoDataValue() in python. > In my python code, I can also call gdal_translate to do this via > subprocess.call() > but I was wondering if passing nodata value as creation option would be > possible?
Almost everything is possible in theory, but I don't feel we need that redundancy. Why couldn't otb extendedFilename mechanisme be extended to support setting nodata through GDALSetNoDataValue(), with a gdal:nodata=value syntax ? You don't need to use subprocess.call() to use gdal_translate functionnality. See https://trac.osgeo.org/gdal/browser/trunk/autotest/utilities/test_gdal_translate_lib.py#L249 -- Spatialys - Geospatial professional services http://www.spatialys.com
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev