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

Glynn Clements glynn.clements at virgin.net
Thu Sep 12 12:03:45 EDT 2002


Alexander Fritz wrote:

> 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?

No.

The truth or falsity of an expression such as rastermap1>rastermap2
varies cell-by-cell. t may be true for some cells and false for
others. It isn't meaningful to compare entire maps in this way.

-- 
Glynn Clements <glynn.clements at virgin.net>



More information about the grass-user mailing list