RSyaoxin,
Check if poBand->GetNoDataValue() is actually returning a nodata value. If
your raster has an out of range nodata value, there is going to be a
problem. poBand->SetNoDataValue(nodata) will unset the nodata value if the
nodata variable is out of range.
On Tue, Jul 12, 2011 at 7:48 PM, RS
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);