[gdal-dev] nodata value assigned via script
Matt Wilkie
matt.wilkie at gov.yk.ca
Fri Oct 17 18:57:50 EDT 2008
Wow, a python question I actually know the answer too! :)
From python you can use "band.SetNoDataValue( float(null_value) )". For
this in context see this tiny utility:
http://maphew.googlecode.com/svn/trunk/gis/gdal_extras/bin/gdalsetnull.py
And the doc on this function:
http://www.gdal.org/classGDALRasterBand.html#c6f081d253dee55c372e54cfdd8f05a6
cheers,
matt wilkie
--------------------------------------------
Geographic Information,
Information Management and Technology,
Yukon Department of Environment
10 Burns Road * Whitehorse, Yukon * Y1A 4Y9
867-667-8133 Tel * 867-393-7003 Fax
http://environmentyukon.gov.yk.ca/geomatics/
--------------------------------------------
Roger André wrote:
> Hi,
>
> I'm getting raster data written by different people who can't seem to
> use the same nodata values. I'm reading the data files via the Python
> API to GDAL, and doing various calculations on the data values, then
> writing new rasters with the results of my calculations. Is there a
> "nodata" value that I can assign to a pixel that the gdal utilities will
> recognize as such later on? All my other values are 32-bit floating
> point values, so I'm not sure what value to assign.
>
> Thanks.
>
> Roger
> --
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
More information about the gdal-dev
mailing list