[GRASSLIST:1589] Re: i.composite and r.in.gdal

Glynn Clements glynn.clements at virgin.net
Wed Oct 29 02:05:38 EST 2003


Ed Davison wrote:

> > > I think you need to set the color palette correctly
> > > before doing the composite. try first ruining r.color
> > > on each image, setting a gray color palette or a
> > > gray.eq and then make the composite
> > 
> > The version in CVS (5.3-cvs) is already updated to apply
> > a grey color table. Using this version 'd.rgb' et al.
> > deliver the expected result immediately.
> 
> Maybe it is just my misunderstanding of i.composite.  I tried d.rgb as
> well and it gave the perfect disply.  But, as I understand it, this is
> not a map that can be output with ps.map as it is 3 different raster
> layers that do not overlay as they have all values in each file.  Seems
> d.rgb is for display only.

Recent versions (5.0.0 and later) of ps.map have an "rgb" command,
which is similar to the "raster" command except that it accepts
separate red/green/blue layers.

All of the most important functions which exist for a single raster
have R/G/B equivalents, e.g.:

	function	composite	R/G/B bands

	import		r.in.ppm	r.in.ppm -b
	export		r.out.ppm	r.out.ppm3
	display		d.rast		d.rgb
	print		ps.map/raster	ps.map/rgb

> I thought that i.composite was to do the same thing but to produce a
> combined output raster that should look the same as the output from
> d.rgb, something that can be plotted with ps.map.  

Note that there is also r.composite, which will create a composite map
from arbitrary maps; it doesn't require the creation of imagery
groups, and can be run non-interactively.

However, as the process of generating a composite map results in
either loss of quality (when using less than 256 levels per component)
or massive colour tables (when using 256 levels per component), it
should be avoided as much as possible (i.e. don't use it if you can
just process the three channels individually).

FWIW, one situation where this currently cannot be avoided is NVIZ,
which doesn't support using separate R/G/B channels as a colour layer;
you have to create a composite map.

-- 
Glynn Clements <glynn.clements at virgin.net>




More information about the grass-user mailing list