[gdal-dev] Compute statistis and ignoring nodata value
Michael ODonnell
odonnems at yahoo.com
Wed Apr 14 13:35:47 EDT 2010
I am trying to compute and set the statistics for a data set that I have created using GDAL, but the no data values are being included. Is there a way to ignore the no data value when computing the statistics. The documentation does not say anything about this, to the best of my knowledge, and it appears to be included in my results. Everything is working except that no data is included during the use of ComputeStatistics.
Here are the steps I am using:
g_MBand->SetNoDataValue(g_nulldata2);
g_MBand->ComputeStatistics(FALSE, &pdfMin2, &pdfMax2, &pdfMean2, &pdfStdDev2, NULL, NULL);
g_InBand->SetStatistics(pdfMin2, pdfMax2, pdfMean2, pdfStdDev2);
Thank your for your help!
Mike
More information about the gdal-dev
mailing list