[GRASS-user] r3.mapcalc / r.mapcalc: Logical Operators &&, || behave differently

"Peter Löwe" peter.loewe at gmx.de
Wed Aug 20 00:34:00 PDT 2014


Hi all,

for r3.mapcalc and r.mapcalc, there seems to be a difference regarding the logical operators (&& ||, etc.):

Assuming that two raster maps BAR and BAZ exist, the following statement creates new map content FOO whenever BAZ and BAR are not null:

r.mapcalc FOO='if((BAZ && BAR),42,null())'

Doing the same with volumes (BAZ3, BAR3) results in an error message:

r3.mapcalc FOO3='if((BAZ3 && BAR3),42,null())'

=>

Incorrect argument types to function or()
Parse error

Where's my mistake ?

FWIW: I'm using GRASS6.4.2 on Linux

GRASS 6.4.2 (2012)
Revision: 45934


Best,
Peter

<peter.loewe at gmx.de>


More information about the grass-user mailing list