[gdal-dev] GDALComputeRasterMinMax and 'nodata value'.
Frank Warmerdam
warmerdam at pobox.com
Thu Jun 5 14:13:51 EDT 2008
Michele Sanges wrote:
> Hi,
>
> why the function GDALComputeRasterMinMax() computes the two values
> taking in account also the 'nodata value'?
>
> For example:
>
> # gdalinfo E020N40.DEM
...
> Band 1 Block=4800x1 Type=UInt16, ColorInterp=Undefined
> Min=-9999.000 Max=5825.000
> Minimum=-9999.000, Maximum=5825.000, Mean=-2347.600, StdDev=4873.500
> NoData Value=-9999
Michele,
I believe these values are computed by the GDALRasterBand::ComputeStatistics()
method which appears to include nodata handling. So I'm not exactly sure why
it isn't excluding -9999 properly. Perhaps a round off issue?
Can you submit a ticket with a dataset demonstrating the issue? Hopefully
a small dataset?
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | President OSGeo, http://osgeo.org
More information about the gdal-dev
mailing list