<br><br><div class="gmail_quote">On Fri, Apr 13, 2012 at 12:07 PM, David Strip <span dir="ltr">&lt;<a href="mailto:gdal@stripfamily.net">gdal@stripfamily.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
What data formats besides geotiff  support a NODATA value? Is there a uniform GDAL approach to determining the NODATA value or otherwise determining if a pixel is a NODATA pixel? I know that this value is stored in a geotiff tag, but that won&#39;t work for other formats.<br>

<br>
<br><br></blockquote><div><br></div><div>I think a lot of formats support the concept of NODATA.  The GDAL API has functions for checking for this in the GDALRasterBand class, for instance, as</div>double GDALRasterBand::GetNoDataValue() in the C++ or in the C API as GDALGetRasterNoDataValue().</div>
<div class="gmail_quote"><br></div><div class="gmail_quote">I&#39;ve found that this sometimes works, but not always.  What I do is to read the raster data and change everything outside the minimum to maximum range (returned by two other API functions) to my own software&#39;s NODATA value.</div>
<div class="gmail_quote"><br></div><div class="gmail_quote">Hope that helps,</div><div class="gmail_quote"><br></div><div class="gmail_quote">carl</div>