-
Notifications
You must be signed in to change notification settings - Fork 1
raster aggregation
Giovanni edited this page Jul 11, 2014
·
6 revisions
####Description#### The aggregation.py script allows raster to be upscaled according to a scale factor (a multiple factor of pixels). The aggregation of pixels is computed with different statistical parameters: mean, max, min, sum and standard deviation. It uses Numpy and GDAL modules.
The script is a stand-alone as a GDAL utility, it can be parsed from command line.
####Parameters####
- inraster: input raster
- outraster: output raster, float 32 TIFF
- cellfact: factor of cell multiplication (i.e. output pixel size is "cellfactor"x"cellfactor" times larger than input)
- - at: aggregation technique:
- AVG: average (default)
- SUM: sum
- MAX: maximum
- MIN: minimum
- STD: standard deviation
- -e: it expands the output to fit a multiple of the cell factor otherwise output is reduced (default)
- -nd: propagates NoData in computation (a cell with a NoData gives NoData), otherwise NoData are ignored (NoData don't contribute to computation, Nodata-only cells give NoData)
####Usage#### This aggregates the input raster with a pixel size 16 times bigger (cell factor = 4) summing the values of the 16 pixels and expanding the output raster.
$python aggrepation.py /home/user/input.tif /home/user/output.tif 4 -at 'SUM' -e