[GRASS5] r.mapcalc bug/64bit?

Hamish hamish_nospam at yahoo.com
Mon May 1 04:01:27 EDT 2006


> # filter command to check if a new frost period starts or
> # an existing one continues:
> GRASS 6.1.cvs (pat):~ > r.mapcalc \
>    'startday=if(modis_t_a_lst1km20040102.daily_min < -2.0 && \
>    (startday_previous == 0 || condition_previous == 0), 2, \
>     startday_previous)'
>  100%
> 
> GRASS 6.1.cvs (pat):~ > r.info -r startday
> min=-2147483648
> max=-2147483648
> 
> GRASS 6.1.cvs (pat):~ > r.univar startday
> ...
> total null and non-null cells: 1136163
> total null cells: 1136163
> Of the non-null cells:
> ----------------------
> n: 0
> minimum: nan
> maximum: nan
> range: nan
> mean: nan
> standard deviation: nan
> variance: nan
> variation coefficient: nan %
> sum: 0


No problem, besides r.info (both -r and normal) doesn't translate NULLs.

on a 32-bit P4:
G61> r.mapcalc startday_previous='null()'
 100%
G61> r.info startday_previous -r
min=-2147483648
max=-2147483648

maybe init start maps to 0,1 instead of null(),1  ?

in r.info test min,max result with G_is_null_value() ?
remember for CELL maps int can't be set to nan.


Hamish




More information about the grass-dev mailing list