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

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,

Miguel.

Hei Miguel,

I would do it in two steps:

  1. sum your maps with r.series

  2. take the average per “area” with either r.univar (if you want table output) or r.stats.zonal (if you want map output).

Cheers

Stefan

···

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,

Miguel.

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.

Following methods are available:

    average: average value
    count: count of non-NULL cells
    median: median value
    mode: most frequently occurring value
    minimum: lowest value
    maximum: highest value
    range: range of values (max - min)
    stddev: standard deviation
    sum: sum of values
    variance: statistical variance
    diversity: number of different values
    slope: linear regression slope
    offset: linear regression offset
    detcoeff: linear regression coefficient of determination
    tvalue: linear regression t-value
    min_raster: raster map number with the minimum time-series value
    max_raster: raster map number with the maximum time-series value

HTH

-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/How-to-get-the-mean-of-overlaping-areas-between-rasters-tp5294798p5294823.html
Sent from the Grass - Users mailing list archive at Nabble.com.

On Nov 8, 2016 3:41 PM, “Helmut Kudrnovsky” <hellik@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