[GRASSLIST:938] RE: Basic volume calculation question
Patton, Eric
epatton at nrcan.gc.ca
Thu Apr 27 12:00:40 EDT 2006
Thanks that worked great, Wolf!
~ Eric.
-----Original Message-----
From: Wolf Bergenheim
To: Patton, Eric
Cc: 'Wolf Bergenheim '; 'GRASS Users '
Sent: 4/27/2006 10:33 AM
Subject: RE: [GRASSLIST:928] RE: Basic volume calculation question
On Thu, 27 Apr 2006, Patton, Eric wrote:
> Thanks for that idea, Wolf. I just tried it using > 0.0 as the test
case,
> with the same results. It does seem like some kind of integer rounding
is
> going on.
>
> Can anyone comment on the datatype output from an if(x,a,b) statement
in
> r.mapcalc when input maps are type float?
>
In your case it returns the value Diff_Nov1998_May1998_5m, but since you
are making a MASK it should probably just return 1, right? Since masks
are
treated as integers I'm guessing that this is where the rounding
happens.
Your spell would be:
> r.mapcalc MASK = 'if(Diff_Nov1998_May1998_5m > 0.0, 1, null())'
--Wolf
--
<:3 )---- Wolf Bergenheim ----( 8:>
More information about the grass-user
mailing list