Quantcast
Channel: Question and Answer » gdal
Viewing all articles
Browse latest Browse all 397

GDAL (Python) Aggregate Raster Into Lower Resolution

$
0
0

I have a (continent-scale) raster with 30m resolution in an Albers equal area projection. Each 30m cell has a value 1-34.

I would like to aggregate information from this raster into a 1km grid such that each 1km grid cell contains a floating-point value which is the number of 30m cells with a value of 2 divided by the total number of 30m cells which fit into the 1km cell.

Is there a way of doing this with GDAL? Or an efficient way to hook GDAL and Python together to perform the calculation (given the large size of the raster, not all of it fits into RAM at once)?


Viewing all articles
Browse latest Browse all 397

Trending Articles