Excellent   Maciek  and Glynn :)

Although the logic is different (in the solution of Maciek I do a check
before the NULL value, while in the solution of Glynn I do a check before
non-NULL values), I believe that the result is the same.
One note: with the solution of Glynn (at least using the shell from QGIS) it
works with single quotes ' and not with double quote " .
gab@gab-laptop:~$ r.mapcalc "output_2 = if(!isnull(a),a,if(!isnull(b),b,c))"
bash: !isnull: event not found
gab@gab-laptop:~$ r.mapcalc 'output_2 = if(!isnull(a),a,if(!isnull(b),b,c))' 
# OK

Thank you very much

Gabriele
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/r-mapcalc-3-maps-tp5929440p5932658.html
Sent from the Grass - Users mailing list archive at Nabble.com.
_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to