[GRASS5] r.mapcalc bug/64bit?
Glynn Clements
glynn at gclements.plus.com
Tue May 2 21:03:02 EDT 2006
Markus Neteler wrote:
> > If you want the normal boolean axioms:
> >
> > true || x == true
> > false && x == false
> >
> > to hold even when x is null, you can replace && and || with:
> >
> > x || y -> eval(nx=if(isnull(x),0,x), ny=if(isnull(y),0,y),if(nx||ny,1,x||y))
> > x && y -> eval(nx=if(isnull(x),1,x), ny=if(isnull(y),1,y),if(!nx||!ny,0,x&&y))
> >
> > That's rather messy. If desired, I can re-write the && and ||
> > operators accordingly (or add an alternative set of and/or operators).
>
> To maintain the behaviour, the && and || may remain.
> To have an alternative set of and/or operators would be pretty good
> (and solve my problem!). In fact, doing the eval mess is rather
> complicated and error prone.
>
> Looking forward the alternative set,
I've committed an update which adds the &&& and ||| operators (and the
and2() and or2() functions) with the new behaviour.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list