[GRASS-user] Get sums of raster values based on the categories of an overlay raster

Johannes Radinger johannesradinger at gmail.com
Tue Nov 26 07:28:26 PST 2013


I'd like to calculate the sum of all raster values that belong to a certain
group. This spatially organized group is also indicated by an overlay
raster (same resolution). Finally I want to assign these sums to a new
raster. That might sound slightly complicated but here an example:

Asume following initial raster map A with random values like:


and an overlay raster indicating 3 groups:


the sums for the groups are:
group 1 = 5
group 2 = 14
group 3= 12

so the final raster would be:


How can such a task be achieved in GRASS (7)?
Any ideas?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20131126/a423814a/attachment.html>

More information about the grass-user mailing list