[GRASS-user] output values of r.composite

Micha Silver micha at arava.co.il
Wed Jan 28 13:34:22 PST 2015


When I use r.composite to create, i.e., a false_color composite from 
three Landsat bands, the RGB values in the composite are slightly 
different than the values in the original bands. Why is that?

Here's an example:

# Import three bands
GRASS 7.0.0svn (UTM33N):~/Downloads > for b in 2 3 4; do r.in.gdal --o  
input=LE71830542003069SGS00_B${b}.TIF output=b${b}; done
r.in.gdal complete.

# Create composite
GRASS 7.0.0svn (UTM33N):~/Downloads > r.composite r=b4 g=b3 b=b2 
out=false_color --o
Creating color table for output raster map...
  100%
Writing raster map <false_color>...
  100%
r.composite complete. Raster map <false_color> created.

GRASS 7.0.0svn (UTM33N):~/Downloads > r.info -g false_color
north=1065915
south=856485
east=731415
west=497985

# Choose a point for testing
GRASS 7.0.0svn (UTM33N):~/Downloads > x=600000; y=900000

# and query with r.what
GRASS 7.0.0svn (UTM33N):~/Downloads > r.what -n map=b4,b3,b2 coord=${x},${y}
easting|northing|site_name|b4|b3|b2
600000|900000||67|108|96            <<=============

GRASS 7.0.0svn (UTM33N):~/Downloads > r.what -n -r map=false_color 
coord=${x},${y}
easting|northing|site_name|false_color|false_color_color
600000|900000||12712|065:106:098        <<============
GRASS 7.0.0svn (UTM33N):~/Downloads >

Thanks,
Micha




More information about the grass-user mailing list