[gdal-dev] GDALComputeRasterMinMax Error
RSyaoxin
RSyaoxin at hotmail.com
Tue Jul 12 10:18:55 EDT 2011
Hi,all
I have a 32-float image with much "NoDatavalue",and I want to get the
minimum value and maximum value.Here is my code:
int bGotMin, bGotMax;
double adfMinMax[2];
double nodata=poBand->GetNoDataValue();
poBand->SetNoDataValue(nodata);
adfMinMax[0] = poBand->GetMinimum( &bGotMin );
adfMinMax[1] = poBand->GetMaximum( &bGotMax );
if( ! (bGotMin && bGotMax) )
GDALComputeRasterMinMax(poBand, FALSE, adfMinMax);
The maximum value(34.3386) I obtained that is right,but the minimum
value is -1.#INF,not -61.990734. -61.990734 is what I want results. That's
Why?I hope to get some help.
Thank you!
Kind regards.
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/GDALComputeRasterMinMax-Error-tp6575247p6575247.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
More information about the gdal-dev
mailing list