[GRASS5] r.mapcalc bug/64bit?

Markus Neteler neteler at itc.it
Wed May 3 03:26:14 EDT 2006


Glynn,

thanks for submitting the new operators. Here the test report:
- the first condition works fine (for me) now 


+ r.info -r modis_t_a_lst1km20040102.daily_min
min=-24.290000
max=-16.510000
+ r.info -r startday_previous
min=1
max=1
+ r.info -r condition_previous
min=1
max=1
+ r.info -r duration
min=1
max=1
+ r.mapcalc 'startday=if(modis_t_a_lst1km20040102.daily_min < -2.0 &&& (startday_previous == 0 ||| condition_previous == 0), 2, startday_previous)'
 100%
+ r.info -r startday
min=1
max=1


... but here I am not sure if it is right (program continues):


+ r.info -r startday_previous
min=1
max=1
+ r.mapcalc 'condition=if(startday - startday_previous > 0 ||| modis_t_a_lst1km20040102.daily_min < -2.0, 1, 0)'
 100%
+ r.info -r condition
min=1
max=1
+ r.mapcalc 'duration=if(condition == 1, if(condition_previous == 1 &&& condition  == 1, duration + 1, 1), duration)'
 100%
+ r.info -r duration
min=-2147483648
max=-2147483648


Should
 a = if (1 == 1, if( 1 == 1 &&& 1 == 1, 1 + 1,1 ), 1)

 a= 2 instead of null?

Markus




More information about the grass-dev mailing list