Nikos:
> > Try this:
> > r.mapcalc river="if(river==$old, $new, null())"


Glynn:
> Note that this won't work in 7.0, where r.mapcalc uses the parser. It
> will complain that r.mapcalc doesn't have a river=... option.

> For portability, always:

> 1. quote the entire expression, and
> 2. insert a space before the first = sign, e.g.:

>       r.mapcalc "river = if(river==$old, $new, null())"

> This will work with all versions of r.mapcalc.


Thanks Glynn.

I assume the above tips are valid for "normal" r.mapcalc use, that is
not within from a script. Having a space before the 1st = sign is in
addition more clear/easy to read when it comes to lots and long
r.mapcalc one-liners, one after another.

Kind regards, Nikos

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to