[GRASS5] r.mapcalc and NULL question
neteler at geog.uni-hannover.de
Mon Jan 15 13:23:31 EST 2001
(cc to the list for some more explanations)
On Mon, Jan 15, 2001 at 09:35:13AM -0800, Rich Shepard wrote:
> On Mon, 15 Jan 2001, Markus Neteler wrote:
> > 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?
> Can you replace the NULL with a finite value such as -99 (for example)? If
> so, then you can set up a case to replace -99 with whatever value you want.
> Alternatively, what I used to do in Idrisi is to build a new map with all
> cells containing zeros. Then I add my streams map to the zero map and now
> all non-stream cells have the value of zero. That removes the nulls and
> leaves the original maps intact.
thanks for your quick response. Of course I could do that, but I
am searching for a general solution as I am script programming (with
So the users don't want convert their maps qithin every loop... :-)
Generally r.null would do the job, but that's too time consuming for my
The NULLs I would like to keep for overlayed displaying (this wouldn't
work with ZEROs).
I am writing a script for my students to stepwise flood landscapes
with graphical output on the monitor for each step.
Hope there is a built-in r.mapcalc solution which I have overseen...
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo at geog.uni-hannover.de with
subject 'unsubscribe grass5'
More information about the grass-dev