[GRASSLIST:4815] r.mapcalc magic
Rado Bonk
rbonk at host.sk
Thu Oct 24 17:53:08 EDT 2002
Hi,
My raster map consists of individual discrete pixels and NULL values
around them (map is the results of s.to.rast command). Since I need to
reproject the map (using i.rectify) I have to change all the NULL
values into to "9999" (or other arbitrary value, zero is also
acceptable). It's because the i.rectify somewhat doesn't produce results
using NULL maps as input.
I tried to do that with r.mapcalc, with the following result:
GRASS:~ > r.mapcalc sitmap1 = 9999 + if(isnull(sitmap),0,sitmap)
bash: syntax error near unexpected token `if(i'
Where is the problem?
Other thing, I expected r.support to replace the NULL
values with "zero" when choosing the appropriate option, but it doesn't
work.
Thanks,
Rado
--
Radoslav Bonk M.S.
Dept. of Physical Geography and Geoecology
Faculty of Sciences, Comenius University
Mlynska Dolina 842 15, Bratislava, SLOVAKIA
tel: +421 2 602 96 250 e-mail: rbonk at host.sk
More information about the grass-user
mailing list