<div dir="ltr">Excellent! Thanks very much for the info, and links to the docs.<br>--<br><br><div class="gmail_quote">On Sat, Oct 18, 2008 at 12:40 AM, Klokan Petr Přidal <span dir="ltr"><<a href="mailto:klokan@klokan.cz">klokan@klokan.cz</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Roger,<br>
<br>
Matt answered the question already...<br>
<br>
The official documentation for handling masks and nodata values in GDAL is:<br>
<a href="http://trac.osgeo.org/gdal/wiki/rfc15_nodatabitmask" target="_blank">http://trac.osgeo.org/gdal/wiki/rfc15_nodatabitmask</a><br>
<br>
and the complete python interface is tested in this file:<br>
<a href="http://trac.osgeo.org/gdal/browser/trunk/autotest/gcore/mask.py" target="_blank">http://trac.osgeo.org/gdal/browser/trunk/autotest/gcore/mask.py</a><br>
<font color="#888888"><br>
Klokan<br>
</font><div><div></div><div class="Wj3C7c"><br>
On Sat, Oct 18, 2008 at 12:57 AM, Matt Wilkie <<a href="mailto:matt.wilkie@gov.yk.ca">matt.wilkie@gov.yk.ca</a>> wrote:<br>
> Wow, a python question I actually know the answer too! :)<br>
><br>
> From python you can use "band.SetNoDataValue( float(null_value) )". For this<br>
> in context see this tiny utility:<br>
> <a href="http://maphew.googlecode.com/svn/trunk/gis/gdal_extras/bin/gdalsetnull.py" target="_blank">http://maphew.googlecode.com/svn/trunk/gis/gdal_extras/bin/gdalsetnull.py</a><br>
><br>
> And the doc on this function:<br>
> <a href="http://www.gdal.org/classGDALRasterBand.html#c6f081d253dee55c372e54cfdd8f05a6" target="_blank">http://www.gdal.org/classGDALRasterBand.html#c6f081d253dee55c372e54cfdd8f05a6</a><br>
><br>
> cheers,<br>
><br>
> matt wilkie<br>
> --------------------------------------------<br>
> Geographic Information,<br>
> Information Management and Technology,<br>
> Yukon Department of Environment<br>
> 10 Burns Road * Whitehorse, Yukon * Y1A 4Y9<br>
> 867-667-8133 Tel * 867-393-7003 Fax<br>
> <a href="http://environmentyukon.gov.yk.ca/geomatics/" target="_blank">http://environmentyukon.gov.yk.ca/geomatics/</a><br>
> --------------------------------------------<br>
><br>
><br>
> Roger André wrote:<br>
>><br>
>> Hi,<br>
>><br>
>> I'm getting raster data written by different people who can't seem to use<br>
>> the same nodata values. I'm reading the data files via the Python API to<br>
>> GDAL, and doing various calculations on the data values, then writing new<br>
>> rasters with the results of my calculations. Is there a "nodata" value that<br>
>> I can assign to a pixel that the gdal utilities will recognize as such later<br>
>> on? All my other values are 32-bit floating point values, so I'm not sure<br>
>> what value to assign.<br>
>><br>
>> Thanks.<br>
>><br>
>> Roger<br>
>> --<br>
>><br>
>><br>
>> ------------------------------------------------------------------------<br>
>><br>
>> _______________________________________________<br>
>> gdal-dev mailing list<br>
>> <a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
>> <a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
><br>
> _______________________________________________<br>
> gdal-dev mailing list<br>
> <a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
><br>
</div></div></blockquote></div><br></div>