[GRASS-user] Map algebra maximum value

Hi,

I have a problem, I have 4 rasters for the same region, I want to generate another raster that contains only the maximum value for each cell and I want to know from which starting raster it comes. It is possible? Which is the command?

Thanks a lot.

Salvatore

On Tue, Aug 23, 2011 at 1:40 PM, Salvatore Mellino
<salvatore.mellino@gmail.com> wrote:

Hi,

I have a problem, I have 4 rasters for the same region, I want to generate another raster that contains only the maximum value for each cell and I want to know from which starting raster it comes. It is possible? Which is the command?

r.series in=map1,map2,map3,map4 out=map_maxval,map_maxrast
method=maximum,max_raster

should do the trick in one go. map_maxval will hold the maximum value,
map_maxrast the number of the raster with the maximum value, dependent
on the order of input to r.series.

Markus M