3
votes
0answers
95 views

Why are my raster mean and standard deviation -1?

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 ...
3
votes
1answer
203 views

Setting Band Statistics on Raster Image (GeoTIFF)

After doing calculations on a raster and saving it, the image statistics are wrong and need updating. I find examples saying that this should do the job, like in this example: ...
4
votes
2answers
729 views

GDAL does not ignore NoData value

I am trying to calcualate the statistics of a TIFF. The script should ignore the NoData value, but doesn't. What causes this? import gdal from gdalconst import * # register all of the drivers ...
2
votes
1answer
91 views

Create ERDAS IMG Statistics using GDAL C++ API?

I want to create very many ERDAS .img files using GDAL under C++. I don't want to have to process them all in ArcMap to create statistics for them (mainly because ArcMap fumbles when calculating ...
6
votes
1answer
2k views

How to get GDAL to create statistics for GTiff in Python

I regularly create my own GeoTIFF rasters with GDAL in Python, e.g.: from osgeo import gdal from numpy import random data = random.uniform(0, 10, (300, 200)) driver = gdal.GetDriverByName('GTiff') ds ...