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

2012-10-19 Thread Peter Willis
Hello, I have a curious problem with 'gdalinfo' (gdal version 1.9.0 ). I have an input ENVI file with the following .HDR entry: data ignore value = -9.9900e+002 gdalinfo for the IMG file provides stats that exclude all values -999.0 as expected. I then create a masked output file

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

2012-10-19 Thread Even Rouault
Le vendredi 19 octobre 2012 20:41:16, Peter Willis a écrit : Hello, I have a curious problem with 'gdalinfo' (gdal version 1.9.0 ). I have an input ENVI file with the following .HDR entry: data ignore value = -9.9900e+002 gdalinfo for the IMG file provides stats that exclude

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

2012-10-19 Thread Peter Willis
], UNIT[Meter, 1.0]]} -Original Message- From: Even Rouault [mailto:even.roua...@mines-paris.org] Sent: October-19-12 11:53 AM To: gdal-dev@lists.osgeo.org Cc: Peter Willis Subject: Re: [gdal-dev] gdalinfo -stats Misses invalid data value in ENVI header Le vendredi 19 octobre 2012 20

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

2012-10-19 Thread Even Rouault
[Meter, 1.0]]} -Original Message- From: Even Rouault [mailto:even.roua...@mines-paris.org] Sent: October-19-12 11:53 AM To: gdal-dev@lists.osgeo.org Cc: Peter Willis Subject: Re: [gdal-dev] gdalinfo -stats Misses invalid data value in ENVI header Le vendredi 19 octobre 2012

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

2012-10-19 Thread Peter Willis
Willis Subject: Re: [gdal-dev] gdalinfo -stats Misses invalid data value in ENVI header Le vendredi 19 octobre 2012 22:23:49, Peter Willis a écrit : Hello, I am providing the failed example followed by a working example. Let me know if there is any additional information you need. With both

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

2012-10-19 Thread Even Rouault
Le vendredi 19 octobre 2012 22:57:13, Peter Willis a écrit : Hello, The one listed as 'failed' actually fails for me as it is sent . Just to be sure we are talking about the same thing, what do you call fail exactly ? Is it that gdalinfo doesn't report NoData Value=-999 for the bands ?

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

2012-10-19 Thread Peter Willis
-12 2:08 PM To: gdal-dev@lists.osgeo.org Cc: Peter Willis Subject: Re: [gdal-dev] gdalinfo -stats Misses invalid data value in ENVI header Le vendredi 19 octobre 2012 22:57:13, Peter Willis a écrit : Hello, The one listed as 'failed' actually fails for me as it is sent . Just to be sure we

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

2012-10-19 Thread Peter Willis
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

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

2012-10-19 Thread Even Rouault
Le vendredi 19 octobre 2012 23:57:01, Peter Willis a écrit : Hello, At step #6, gdalinfo -stats reports data stats with the -999 values calculated into the min/max/mean/stdev. Band 2 Block=2178x1 Type=Float32, ColorInterp=Undefined Description = Band 2 Min=-999.000 Max=12.250

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

2012-10-19 Thread Peter Willis
Hello, Good news. Removing the '.aux.xml ' file and again running gdalinfo -statsindeed fixes the problem. I now get the expected statistics values. Thank you for your help. Best Regards, Peter Le vendredi 19 octobre 2012 23:57:01, Peter Willis a écrit : Hello, At step #6,