Back to GRASS: simple mapcalc issue
Markus Neteler
neteler at geog.uni-hannover.de
Wed Apr 5 04:58:59 EDT 2000
Dear Andrea,
On Wed, Apr 05, 2000 at 09:46:58AM +0200, A. Giacomelli wrote:
> Dear list,
>
> after a long time "off GRASS" (and using other nastier packages) I have
> a chance to work again with this GREAT PIECE OF SOFTWARE. My
> congratulations to all the people who are maintaining GRASS.
nice to know you back!
> I would simply like to calculate the sum of two rasters r1 and r2
> (suppose these are rasters with two areas -which partially overlay- and
> "null" values around). In my grass4.1 memories, The result of "r1 +r2"
> should return
>
> 1- the sum of r1 and r2 where the rasters overlay,
> 2- the values of r1 (or r2) where they do not overlay.
>
> r.mapcalc in grass 5 does (1) but returns Null instead of (2)...
Currently the behaviour of r.mapcalc in conjuction with NULL
values is a bit strange (at least to me!).
Check, if one or both maps contain NULL values. To my experience
r.mapcalc works o.k. if having maps without NULL values.
If NULLs are existing, map additions do not work sometimes.
r.mapcalc *should* calculate to your wishes, otherwise I guess
it is a bug. Is there anyone else with such experience?
Kind regards
Markus Neteler
More information about the grass-user
mailing list