Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have a set of about 25 rasters whose descriptive statistics I have been examining. The data in the rasters were calculated in Python and the rasters were created using Python-GDAL.

In all but one raster, the mean, std. dev., minimum and maximum seem correct. In one raster, however, the minimum and maximum values are correct (4.842 and 9.458 respectively) but the mean and standard deviation are -1 if I take a look in ArcCatalog and -1.#IND in QGIS.

I opened the raster in Python via GDAL and calculated the minimum and maximum using data[data>band.GetNoDataValue()].min() and data[data>band.GetNoDataValue()].max() respectively, and the values these functions returned were correct (as above). But the mean value via data[data>band.GetNoDataValue()].mean() was 2.905, which is clearly nonsense as this value does not occur within the minimum and maximum value limits for this raster. Any ideas as to what's going wrong?

share|improve this question
    
Is there a .aux.xml file associated with the file? If so delete it and run gdalinfo -stats again. What file format? –  kyle Oct 11 '13 at 16:07
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.