You can use r.null to turn the nulls into zeroes,
then use r.mapcalc to give values where there is a 0.
But, maybe you were thinking it would be better to
modify r.mapcalc to do this...
Bill Baker
-----Original Message-----
From: Markus Neteler [mailto:neteler@geog.uni-hannover.de]
Sent: Monday, January 15, 2001 11:04 AM
To: grass5 developers list
Subject: [GRASS5] r.mapcalc and NULL question
Hi there,
maybe a r.mapcalc/NULL FAQ, but I don't get it...
Assume you have a streams map (streams contain values,
other cells=NULL).
Now I want to add some values *everywhere* using r.mapcalc, but
it is only added in those cells not containing a NULL value.
Any ideas how to overcome this problem?
Thanks in advance
Markus
----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write
to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'
----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'
Or just use the if() construct in r.mapcalc.
echo 'streams.2 = if (isnull(streams),-9999,streams)' | r.mapcalc
or something like that. I've used this more than a few times to create
mask layers.
On Mon, Jan 15, 2001 at 10:39:55AM -0700, William L. Baker wrote:
You can use r.null to turn the nulls into zeroes,
then use r.mapcalc to give values where there is a 0.
But, maybe you were thinking it would be better to
modify r.mapcalc to do this...
Bill Baker
-----Original Message-----
From: Markus Neteler [mailto:neteler@geog.uni-hannover.de]
Sent: Monday, January 15, 2001 11:04 AM
To: grass5 developers list
Subject: [GRASS5] r.mapcalc and NULL question
Hi there,
maybe a r.mapcalc/NULL FAQ, but I don't get it...
Assume you have a streams map (streams contain values,
other cells=NULL).
Now I want to add some values *everywhere* using r.mapcalc, but
it is only added in those cells not containing a NULL value.
Any ideas how to overcome this problem?
Thanks in advance
Markus
--
Eric G. Miller <egm2@jps.net>
----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'