[GRASS5] r.mapcalc question
Jachym Cepicky
jachym.cepicky at centrum.cz
Wed Feb 2 15:48:58 EST 2005
what about r.patch?
else one could write some perl script, which would generate the sctring, full
of 'if(isnull(.....' for mapcalc.
Jáchym
On Wed, Feb 02, 2005 at 11:14:35AM -0800, David Piasecki wrote:
> Since I'm relatively new to GRASS, I just ran across the r.mapcalc
> command, and I started playing with it for merging image data. I've
> tried the following, some which works (but it's annoying) and some
> which doesn't work but I'd like to know why. For both, assume the
> region is set correctly.
>
> First of all, what works:
> r.mapcalc
> 'calc.red=if(isnull(image0.red),image1.red,if(isnull(image1.red),image0.
> red))'
>
> That's great; however, I have 42 images. So I tried some logic...
> r.mapcalc 'calc.red=( image0.red || image1.red )'
> r.mapcalc 'calc.red=( image0.red + image1.red )'
>
> I think these aren't working because GRASS has a problem evaluating
> these expressions since image0.red is null wherever image1.red is not
> null. However, no error messages are given. Is there an easier way to
> do this than the first command given above?
>
> Thanks,
> David
>
>
>
> _______________________________________________
> grass5 mailing list
> grass5 at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass5
--
Jachym Cepicky
e-mail: jachym.cepicky at centrum.cz
URL: http://les-ejk.cz
GPG: http://www.fle.czu.cz/~jachym/gnupg_public_key/
More information about the grass-dev
mailing list