r.composite(1grass)
π r.composite β the GRASS manual, but make it cute
okay bestie, so this is r.composite from the GRASS User's Manual, and it's literally the glow-up tool for your rasters π
β¨ NAME β¨
r.composite β takes a red raster, a green raster and a blue raster and smooshes them into ONE single composite raster map. it's giving RGB serve π
π·οΈ KEYWORDS π·οΈ
raster, composite, RGB
π SYNOPSIS π
r.composite
r.composite --help
r.composite [-dc] red=name green=name blue=name [levels=integer]
[level_red=integer] [level_green=integer] [level_blue=integer]
output=name [--overwrite] [--help] [--verbose] [--quiet] [--ui]
π© Flags π©
-dβ Dither π«§-cβ Use closest color π―--overwriteβ lets your output files overwrite files that already exist (permission to be messy, granted β¨)--helpβ prints the usage summary π--verboseβ verbose module output (it will yap, and we love that π¬)--quietβ quiet module output π€«--uiβ force launching the GUI dialog π₯οΈ
π Parameters π
red=name[required] β name of raster map to be used for<red>β€οΈgreen=name[required] β name of raster map to be used for<green>πblue=name[required] β name of raster map to be used for<blue>πlevels=integerβ number of levels to be used for each component Options: 1-256 Default: 32level_red=integerβ number of levels to be used for<red>Options: 1-256level_green=integerβ number of levels to be used for<green>Options: 1-256level_blue=integerβ number of levels to be used for<blue>Options: 1-256output=name[required] β name for the output raster map π
π DESCRIPTION π
so the whole vibe here? this program combines three raster maps into one composite RGB map. for every input map layer, it takes the matching component out of that map's color table β like, for the red map it grabs the red component, and so on and so forth, iykyk π¨
ngl, in general your maps should be using a grey-scale color table. that's the move π
π NOTES π
the default number of intensity levels for each component is 32, which gets you a total of 32768 possible colors (that's equivalent to 15 bits per pixel, no cap π₯).
but listen β if you use significantly more levels than that, two things happen:
r.compositetakes longer to run β³- displaying the resulting layer with
d.rastis also significantly slower π
Floyd-Steinberg dithering is optionally used with the -d flag. cute, optional, iconic β¨
πΈ EXAMPLES πΈ
π°οΈ RGB composite of three satellite bands
color composite of a LANDSAT scene (North Carolina sample dataset):
g.region raster=lsat7_2002_10
r.composite blue=lsat7_2002_10 green=lsat7_2002_20 red=lsat7_2002_30 \
output=lsat7_2002_rgb
π«§ RGB composite with dithering
creating a composite RGB raster using 32 color levels per layer, with dithering:
r.composite -d red=elevation.r green=elevation.g blue=elevation.b \
output=elev.composite
π SEE ALSO π
d.rast,d.rgb,r.blend,r.colors,r.rgb- Wikipedia Entry: Floyd-Steinberg dithering
π AUTHOR π
Glynn Clements
π¦ SOURCE CODE π¦
Available at: r.composite source code (history)
Latest change: Tuesday Jun 03 10:48:19 2025 in commit: 9e409925132a46abf5f445dc9b9cd9308cf215b1
Main index | Raster index | Topics index | Keywords index | Graphical index | Full index
Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual
and that's the whole page bestie π«Ά this lil manual came to you courtesy of GRASS 8.5.0, and yeah the footer said the same thing β GRASS 8.5.0, manual page for r.composite(1grass), periodt π
β¨
π¦ where this page comes from
- alpine 3.24: grass-gis-doc 8.5.0-r1 Β· GPL-2.0-or-later
- ubuntu stonking: grass-doc 8.5.0-1ubuntu1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms