[GRASSLIST:4490] Re: if-then-else in GRASS

Camilo Andres Castiblanco Her camilocast at tutopia.com
Fri Sep 13 00:23:02 EDT 2002


Alex:

You can do with r.mapcalc

othermap=if (rastermap1>rastermap2,0,1)

The new raster map will have only values of  0 and 1
0 represent the true condition and 1 represent the false 
condition

Camilo

----- Original Message -----
From: "Alexander Fritz" <Alex_Fritz at gmx.net>
To: <GRASSLIST at baylor.edu>
Sent: Thursday, September 12, 2002 3:37 AM
Subject: [GRASSLIST:4472] if-then-else in GRASS


> Hello everybody,
>
> I'm trying to do a if-then-else instruction in GRASS. Does anybody know if
> there is something like that possible in GRASS. I want do that
>
> if rastermap1>rastermap2 then
> else
>
> I know that I can do similar instructions with r.mapcalc. But r.mapcalc
> produces always a new map. Is there a possibility to get the information
> when the if command in r.mapcalc is true or false?
>
> Greetings Alex
>



More information about the grass-user mailing list