[GRASSLIST:930] RE: Basic volume calculation question

Wolf Bergenheim wolf+grass at bergenheim.net
Thu Apr 27 10:15:45 EDT 2006


On Thu, 27 Apr 2006, Patton, Eric wrote:

> Thanks for that nice overview. I tried using r.volume with a mask in place,
> as in your example. Here's how I created the mask:
>
> r.info -r Diff_Nov1998_May1998_5m   # This map is a surface difference;
> min=-2.400000                       # accumulation is between 0 and 1.65
> max=1.650000
>
> r.info -t Diff_Nov1998_May1998_5m   # Yes, we are dealing with float data
> datatype=FCELL
>
> r.mapcalc MASK = 'if(Diff_Nov1998_May1998_5m > 0, Diff_Nov1998_May1998_5m,
> null())'
> 100%
> [Raster MASK present]

Hmm to me it sound like it is rounding your map to integers. have you tried:
r.mapcalc MASK = 'if(Diff_Nov1998_May1998_5m > 0.0, Diff_Nov1998_May1998_5m, null())'

--Wolf

-- 

<:3 )---- Wolf Bergenheim ----( 8:>




More information about the grass-user mailing list