[GRASS-user] output values of r.composite

Markus Metz markus.metz.giswork at gmail.com
Thu Jan 29 02:28:51 PST 2015


On Wed, Jan 28, 2015 at 10:34 PM, Micha Silver <micha at arava.co.il> wrote:
> 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?

Because the number of levels to be used for each component is by
default 32, not 256 [0].

Markus M

[0] http://grass.osgeo.org/grass70/manuals/r.composite.html

>
> 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
>
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user


More information about the grass-user mailing list