[Gdal-dev] Computing MinMax on a NETCDF subdataset

Joaquim Luis jluis at ualg.pt
Mon Apr 23 22:45:29 EDT 2007


Hi,
In my gdalread MEX file I have this call

GDALComputeRasterMinMax(hBand, FALSE, adfMinMax);

which, in case of reading a NETCDF file, is returning

adfMinMax[0] = 0  and adfMinMax[1] = 0
or
adfMinMax[0] = -4294967295.0  and adfMinMax[1] = 4294967295.0
if I change to
GDALComputeRasterMinMax(hBand, TRUE, adfMinMax);

Note that I'm using this (example)
Z =  gdalread('NETCDF:"D:\SVN\global.nc":z');
which is the correct way of using this MEX, confirmed by the fact that Z 
has the correct values.

For all other formats that I have tested, the min/max is correct.

Is this on purpose or a feature?

Joaquim Luis





More information about the Gdal-dev mailing list