r.composite(1)
π r.composite π
okay bestie, we're in the GRASS GIS User's Manual and today's main character is r.composite β the little icon that smashes red, green and blue rasters together into one gorgeous composite. periodt. π
β¨ NAME β¨
r.composite β combines red, green and blue raster maps into a single composite raster map. it's giving RGB glow-up. π
π 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. yes bestie, the Floyd-Steinberg kind, we'll get there π-cβ Use closest color--overwriteβ Allow output files to overwrite existing files (chaotic but valid)--helpβ Print usage summary--verboseβ Verbose module output--quietβ Quiet module output--uiβ Force launching 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: 32
level_red=integerβ Number of levels to be used for<red>- Options: 1-256
level_green=integerβ Number of levels to be used for<green>- Options: 1-256
level_blue=integerβ Number of levels to be used for<blue>- Options: 1-256
output=name[required] β Name for output raster map
π DESCRIPTION π
so this program takes three raster maps and squishes them into one composite RGB map. iconic behavior honestly.
for every single input map layer, it pulls the matching component straight out of that map's color table β like, for the red map it grabs the red component, and so on down the line. it's a whole coordinated outfit moment. π
and ngl? in general your maps should be using a grey-scale color table. that's the vibe. that's the assignment.
π«Ά NOTES π«Ά
the default number of intensity levels for each component is 32, which gives you a total of 32768 possible colors β that's equivalent to 15 bits per pixel. cute, right?
but bestie, listen. if you go significantly higher than that on the levels? two things happen and neither is fun:
r.compositetakes longer to run π- displaying the resulting layer with
d.rastalso gets significantly slower π
Floyd-Steinberg dithering is optionally used with the -d flag. it's optional. it's a choice. it's a lifestyle. β¨
π 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)
Accessed: Saturday Jan 17 05:40:44 2026
Main index | Raster index | Topics index | Keywords index | Graphical index | Full index
okay that's the whole page, no cap. π
Β© 2003-2025 GRASS Development Team, GRASS GIS 8.4.2 Reference Manual
this was GRASS 8.4.2 energy the entire time, bestie β go make something pretty. π¦β¨π
π¦ where this page comes from
- fedora 44: grass 8.4.2-4.fc44 Β· 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