[GRASS-user] How to get the mean of overlaping areas between rasters.

Markus Neteler neteler at osgeo.org
Tue Nov 8 07:04:02 PST 2016


On Nov 8, 2016 3:41 PM, "Helmut Kudrnovsky" <hellik at web.de> wrote:
>
> M. wrote
> > Dear all,
> >
> > I want to sum 13 raster maps, and calculate the mean of areas which
> > overlap
> > among them. I mean, sum all the maps, but in those areas which they
> > overlap
> > calculate the mean of the values.
> >
> > Does anybody know a method to do it?
> >
> > Thanks for the attention,
>
> hope to understand it right, so maybe
>
> https://grass.osgeo.org/grass73/manuals/r.series.html
>
> r.series - Makes each output cell value a function of the values assigned
to
> the corresponding cells in the input raster map layers.

These methods are relevant:

    count: count of non-NULL cells
     sum: sum of values

By inputting all maps and using these two methods together, you'll get two
respective output maps.

Then use the count map to create a mask for the area(s) with highest count
values by using an if() condition in r.mapcalc.

Markus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20161108/41b349ce/attachment.html>


More information about the grass-user mailing list