[gdal-dev] write nodata value using using creation option

Rashad Kanavath mohammedrashadkm at gmail.com
Tue Oct 31 04:44:33 PDT 2017


On Tue, Oct 31, 2017 at 12:10 PM, Even Rouault <even.rouault at spatialys.com>
wrote:

> 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 ?
>
Yes.  I will see if can send a patch to otb!

>
>
> You don't need to use subprocess.call() to use gdal_translate
> functionnality.
>

Thanks for the sample code on using gdal_translate as function.

> See
>
> https://trac.osgeo.org/gdal/browser/trunk/autotest/utilities
> /test_gdal_translate_lib.py#L249
>
>
>
> --
>
> Spatialys - Geospatial professional services
>
> http://www.spatialys.com
>



-- 
Regards,
   Rashad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20171031/790f9c3e/attachment-0001.html>


More information about the gdal-dev mailing list