On lundi 30 octobre 2017 16:16:12 CET Rashad Kanavath wrote:
> Hello,
> 
> Is it possible to set nodata using -co option.?
> 
> gdal_translate input.tif output.tif -co TIFFTAG_GDAL_NODATA=-30000
> Input file size is 500, 500
> Warning 6: driver GTiff does not support creation option TIFFTAG_GDAL_NODATA
> 0...10...20...30...40...50...60...70...80...90...100 - done.
> 
> According to doc, TIFFTAG_GDAL_NODATA is an tag available if GeoTIFF
> profile  is GDALGeoTIFF.  and by default the profile is exactly that. I
> cross checked this with sources.
> 
> using -a_nodata is working. But I would like to see if I can pass nodata
> value via creation options. This is because in my workflow I am not using
> gdal_translate utility.

You can use the GDALSetNoDataValue() API, or its declinations in the language 
you use.

-- 
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

Reply via email to