d.to.rast(1grass)

πŸ’– d.to.rast β€” the manual, but make it cute πŸ’–

okay bestie so you know d.to.rast? that's our girl from the GRASS User's Manual. she does one thing and she does it flawlessly: she takes whatever is vibing on your active display monitor and saves it as a raster map. screenshot energy, but make it GIS. ✨

KEYWORDS: display, export, raster πŸŽ€


✨ SYNOPSIS ✨

d.to.rast
d.to.rast --help
d.to.rast output=name  [--overwrite]  [--help]  [--verbose]  [--quiet]
[--ui]

πŸ¦‹ FLAGS πŸ¦‹

  • --overwrite β€” let the output files just steamroll over existing files, no questions asked. permission granted πŸ’…
  • --help β€” prints the usage summary so you're not out here guessing 🫢
  • --verbose β€” verbose module output, aka she will tell you everything
  • --quiet β€” quiet module output, aka she will tell you nothing 🀫
  • --ui β€” forces the GUI dialog to launch. pop-up era.

πŸŽ€ PARAMETERS πŸŽ€

  • output=name [required] β€” the name for your output raster map. yes bestie it's required, you gotta name your baby.

🌸 DESCRIPTION 🌸

so what does d.to.rast actually do? she saves the content of the currently selected monitor into a raster map. simple. iconic. no cap.

the active monitor gets picked with d.mon β€” that's how you tell her which display she's looking at. and plot twist: d.to.rast can also be run straight from the GUI Console tab, so you don't even have to leave the comfy UI. lowkey a dream.

🫢 one tiny thing you need to know: this module is not sensitive to computational region settings. she's not checking the region, she's just copying the monitor. periodt.

πŸ”₯ EXAMPLE πŸ”₯

okay so here's the slay: we're combining different raster and vector map layers to build a composite layer that can be draped over elevation in 3D view. main character energy honestly.

first, add a couple of maps to the layer manager:

g.region raster=elevation
d.rast map=elevation
d.rast map=lakes
d.vect map=roadsmajor width=4
d.vect map=roadsmajor width=2 color=yellow
# create a raster map from the display
d.to.rast output=composite

then ✨ uncheck all the layers except for elevation, and switch to 3D view. in the Data tab, set the color map to the newly created composite map. chef's kiss 😭

Figure: Raster map created by d.to.rast draped over digital elevation model.


πŸ‘€ SEE ALSO πŸ‘€

  • d.out.file
  • d.erase
  • d.rast
  • d.vect
  • d.mon

go read those next, iykyk πŸ’œ


πŸ’œ AUTHOR πŸ’œ

Anna Petrasova, NCSU GeoForAll Lab 🌈


⭐ SOURCE CODE ⭐

available at: d.to.rast source code (history)

latest change: Thursday Feb 20 12:48:50 2025 in commit: 1633be4dc57dd1819a0f6ccd8ea4bc2b8bbec864

Main index | Display 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 was d.to.rast(1grass) from GRASS 8.5.0 β€” go save yourself a raster, you got this πŸ‘‘πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from