[Gdal-dev] Do we need to specifically set band's min, max on writting?

Joaquim Luis jluis at ualg.pt
Tue Jun 12 21:06:58 EDT 2007


Hi,

When saving a dataset to a file do we have to specifically say what are 
datasets min and max?
And if yes, how do we do that? I searched but didn't find any 
"GDALSetRasterMinimum"
I am using GDALRasterIO( hBand, GF_Write, ...) and thought band min, max 
were being
set automatically but a gdalinfo -stats shows this (the rest, as far as 
I can see, is ok)
....
Band 1 Block=1781x1 Type=Float32, ColorInterp=Gray
  Minimum=-1.#IO, Maximum=-1.#IO, Mean=-1.#IO, StdDev=-1.#IO
  Metadata:
    STATISTICS_MINIMUM=-1.#IND
    STATISTICS_MAXIMUM=-1.#IND
    STATISTICS_MEAN=-1.#IND
    STATISTICS_STDDEV=-1.#IND

Thanks

Joaquim Luis



More information about the Gdal-dev mailing list