[GRASS-user] composite raster maps

Vincent Bain bain at toraval.fr
Tue Nov 26 22:59:30 PST 2013


OK for the caution Glynn,

for my particular concern I finally re-ran the process from the source
files.

Thank you,
V.



Le mardi 26 novembre 2013 à 19:07 +0000, Glynn Clements a écrit :
> Markus Metz wrote:
> 
> > > I just realize I've used r.composite for ages without wondering how I
> > > could perform the reverse task. The thing is I ran r.composite on a 3
> > > band geotiff orthoimage, dropped the initial .red, .green and .blue
> > > rasters, and I would need them now in order to run r.out.vtk with the
> > > rgbmaps argument. Dummy...
> > 
> > You can use the # operator of r.mapcalc:
> > 
> > r.mapcalc "map.red = r#map"
> > r.mapcalc "map.green = g#map"
> > r.mapcalc "map.blue = b#map"
> 
> Note that GRASS 7 has the r.rgb script which does just this.
> 
> Also, note that an r.composite+r.rgb round-trip normally loses
> accuracy. By default, the maps generated by r.composite only use 32
> levels for each component (equivalent to a 15-bpp image).
> 
> You can avoid this with "r.composite ... levels=256", but the
> resulting maps will have much larger colour tables (65536 rules rather
> than 1024), which can make certain operations significantly slower.
> 




More information about the grass-user mailing list