[GRASS-user] r.mapcalc --> 3 maps
glynn at gclements.plus.com
Mon Jan 17 12:02:51 EST 2011
Gabriele N. wrote:
> I have three maps A, B, C.
> I would use r.mapcalc to combine them according to this logic:
> Put the values of A and if A is null you put the values of B and if B is
> null you put the values of C.
> I have tried in various ways without success. .. now I'm trying with a
> double IF...
> r.mapcalc "output = if((isnull(a)),b,if(isnull(b)),c)" .....but in this
> case I do not put the values of A
r.mapcalc "output = if(!isnull(a),a,if(!isnull(b),b,c))"
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-user