[GRASS-user] RE: r.mapcalc on RGB composite

Glynn Clements glynn at gclements.plus.com
Wed May 9 13:02:32 EDT 2007


Jarle Pedersen wrote:

> Regarding the earlier questions posed, I figured out the correct syntax  
> for r.mapcalc. However, if anyone care to, I'd still like to know why this  
> shift in coloration happens.

Because you haven't defined a colour table for the new map.

Try "r.colors RGB_water raster=RGB".

An alternative approach would be to use masking, e.g.:

	r.mapcalc 'MASK = dem != 0'
	r.resample in=RGB out=RGB_water
	g.remove rast=MASK

r.resample automatically copies the colours from the input map.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-user mailing list