[gdal-dev] gdalinfo -stats Misses invalid data value in ENVI header

Peter Willis pwillis at aslenv.com
Fri Oct 19 15:06:54 PDT 2012


Hello,

I am seeing that you are correct that the 'no data value'  is being read in each case.
Perhaps my interpretation of the problem appears incorrect.

Look, however at the 'Metadata:' statistics.
Both files have assigned -999 to 'No Data Value'  but    'STATISTICS_MINIMUM' for one file shows -999 (??).
This means the values are not being ignored for the purpose of calculating statistics.

--THE BAD FILE--

Band 2 Block=2178x1 Type=Float32, ColorInterp=Undefined
  Description = Band 2
  Min=-999.000 Max=12.250
  Minimum=-999.000, Maximum=12.250, Mean=-946.817, StdDev=222.404
  NoData Value=-999
  Metadata:
    STATISTICS_MINIMUM=-999
    STATISTICS_MAXIMUM=12.25
    STATISTICS_MEAN=-946.81678963104
    STATISTICS_STDDEV=222.4036660914


---THE GOOD FILE---

Band 2 Block=1677x1 Type=Float32, ColorInterp=Undefined
  Description = Band Math (Band Math (Band Math (1996_104 Landsat-4/5 TM :Surface Temperature Sensor:6:LSatThermalCube_96-98.img):LSatThermalCube_96-98_float.img):LSatThermalCube_96-98_float_cmsk.img)
  Min=0.250 Max=12.250
  Minimum=0.250, Maximum=12.250, Mean=1.379, StdDev=0.995
  NoData Value=-999
  Metadata:
    STATISTICS_MINIMUM=0.25
    STATISTICS_MAXIMUM=12.25
    STATISTICS_MEAN=1.3787828985307
    STATISTICS_STDDEV=0.99545771926881

Note the difference in stats calculations.

Peter





More information about the gdal-dev mailing list