[gdal-dev] Temporal statistics
even.rouault at mines-paris.org
Fri Jul 13 07:10:50 PDT 2012
Selon Knut-Frode Dagestad <knutfrodesoppel at hotmail.com>:
> From a time series of colocated images, I construct a VRT with one band
> for each time step using gdalbuildvrt:
> > gdalbuildvrt -separate mtsat.vrt mtsat/*_IR*00.tif
> Are there any tools that can be used to calculate some statistics (min,
> max, mean, etc) versus time for each pixel of such a 3D Dataset?
Not that I'm aware of
> The rasters are large and timeseries long, so reading everything into a
> Python NumPy cube is not a good solution.
You don't need to have them all simultaneously opened.
An idea for an algorithm would be :
- allocate one matrix for storing the min of each pixel
- allocate one matrix for storing the max of each pixel
- allocate one matrix for storing the sum of each pixel
- allocate one matrix for storing the sum of the square of each pixel
2) Open sequentially each band and update the above matrixes
3) Then you can use directly the min and max matrices, and deduce the mean and
standard deviation from the other matrices.
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
More information about the gdal-dev