[GRASS5] r.patch and NULL data

Markus Neteler neteler at itc.it
Tue Jan 29 11:57:44 EST 2002


On Tue, Jan 29, 2002 at 04:45:14PM +0000, Glynn Clements wrote:
> 
> Markus Neteler wrote:
> 
> > at time I face the problem that r.patch does not work as I
> > expect...
> > 
> > Idea: patch a converted sites map to a underlying raster map
> > in this small data set (11 kb):
> > 
> > http://grass.itc.it/statsgrass/maas_grass_location.tar.gz
> > Maas river bank soil contamination (UTM)
> > 
> > What I did:
> > 
> > grass5 ~/grassdata/maas/user1/
> > 1. s.to.rast in=Zn out=zn
> > 2. r.patch zn,maasbank out=fin
> > 
> > result only contains the raster cells from zn, the maasbank
> > area is not visible (fin = zn).
> > 
> > Also
> >  r.mapcalc fin="if(isnull(zn),maasbank,zn)"
> > doesn't help.
> > 
> > Is it my mistake (which)?
> 
> I find that both r.patch and r.mapcalc work. With r.patch, the
> "maasbank" cells are white; with r.patch, they are yellow.

Aehm - my apologize. I was taking white for NULL, in fact
the d.what.rast is reporting 1.

Sorry for the confusion. Maybe we should modify this color coding
behaviour? But maybe it is only my personal problem.

Thanks, Glynn,

 Markus



More information about the grass-dev mailing list