[GRASSLIST:4821] Re: r.mapcalc magic
Tom Z. Meinlschmidt
tm at salome.datron.cz
Thu Oct 24 14:34:28 EDT 2002
Hi Rado,
GRASS:~ > r.mapcalc sitmap1 = "9999 + if(isnull(sitmap),0,sitmap)"
it works for me :)
tom
On Thu, Oct 24, 2002 at 05:53:08PM -0400 Rado Bonk [rbonk at host.sk] wrote:
> 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
--
===============================================================================
Tomas Meinlschmidt, SBN3, MCT, MCP, MCP+I, MCSE, NetApp Filer & NetCache
Datron s.r.o., Vachkova 3008, 470 01 Ceska Lipa, 487 834 421, f: 487 834 425
gPG fp: D6F7 B1EE 33DA 2073 4EB1 AC60 0A9F FE09 98ED FB06 / $ID: 98EDFB06
GCS d-(?) s: a- C++ ULHISC*++++$ P+++>++++ L+++$>++++ E--- W+++$ N++(+) !o
!K w(---) !O !M V PS+ PE Y+ PGP++ t+@ !5 X? R tv b+ !DI D+ G e>+++
h---- r+++ z+++@
===============================================================================
More information about the grass-user
mailing list