[gdal-dev] Temporal statistics
Even Rouault
even.rouault at mines-paris.org
Fri Jul 13 07:10:50 PDT 2012
Selon Knut-Frode Dagestad <knutfrodesoppel at hotmail.com>:
> Hi,
>
> 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 :
1)
- 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.
>
> Thanks,
> Knut-Frode
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
More information about the gdal-dev
mailing list