[GRASS-user] r.mapcalc --> 3 maps
carlos.grohmann at gmail.com
Sun Jan 16 11:39:51 EST 2011
I think you almost got there.
the IF condition would be this:
> r.mapcalc "output = if((isnull(a)),b,if(isnull(b),c),a)"
so if A is null, use B, otherwise test if B is null. if it is, use C,
otherwise use A.
(note: this is from the top of my mind, I didn't tried it)
Hope this helps.
On Sun, Jan 16, 2011 at 14:35, Gabriele N. <gis.gn at libero.it> wrote:
> Ciao grass users.
> 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
> Help / advice?
> View this message in context: http://osgeo-org.1803224.n2.nabble.com/r-mapcalc-3-maps-tp5929440p5929440.html
> Sent from the Grass - Users mailing list archive at Nabble.com.
> grass-user mailing list
> grass-user at lists.osgeo.org
Prof. Carlos Henrique Grohmann - Geologist D.Sc.
Institute of Geosciences - Univ. of São Paulo, Brazil
Linux User #89721
Can’t stop the signal.
More information about the grass-user