[GRASS5] r.mapcalc bug/64bit?
Glynn Clements
glynn at gclements.plus.com
Mon May 1 12:33:41 EDT 2006
Markus Neteler wrote:
> [re-posted to the list as it may be of wider interest, maybe
> someone knows?]
>
> Glynn, all,
>
> I have discovered a pressing problem (for me) in
> r.mapcalc as far as I see. I am doing time series
> processing of satellite data to find frost periods. As
> far as I see the if() doesn't behave as it should:
>
> # input data, look reasonable:
> GRASS 6.1.cvs (pat):~ > r.info -r modis_t_a_lst1km20040102.daily_min
> min=-24.290000
> max=-16.510000
>
> GRASS 6.1.cvs (pat):~ > r.info -r startday_previous
> min=1
> max=1
>
> GRASS 6.1.cvs (pat):~ > r.info -r condition_previous
> min=1
> max=1
>
> GRASS 6.1.cvs (pat):~ > r.info -r duration
> min=1
> max=1
>
> # 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
So startday is all null.
What does the following say:
r.mapcalc 'test = isnull(modis_t_a_lst1km20040102.daily_min) + isnull(startday_previous) + isnull(condition_previous)'
r.info -r test
?
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list