r.to.rast3(1grass)

✨ r.to.rast3 ✨

okay bestie, welcome to r.to.rast3 from the GRASS User's Manual πŸ’– this one is literally a glow-up machine: it takes your 2D raster map slices and stacks them into ONE 3D raster volume map. it's giving "flat stanleys become a whole sculpture" πŸ—Ώβœ¨

KEYWORDS: raster, conversion, voxel 🧊


🌸 SYNOPSIS 🌸

r.to.rast3
r.to.rast3 --help
r.to.rast3 [-m] input=name[,name,...] output=name  [tilesize=integer]
[--overwrite]  [--help]  [--verbose]  [--quiet]  [--ui]

πŸŽ€ Flags πŸŽ€

  • -m β€” use the 3D raster mask (if it exists) with the output map. she said "mask on, never off" πŸ’…
  • --overwrite β€” lets output files overwrite existing files. permission to be messy granted πŸ™ˆ
  • --help β€” prints the usage summary. your lil cheatsheet bestie 🫢
  • --verbose β€” verbose module output. she talks a LOT (affectionate) πŸ—£οΈ
  • --quiet β€” quiet module output. silent mode, main character who doesn't explain herself πŸ’€
  • --ui β€” forces launching the GUI dialog. for the girlies who need a visual 🌈

πŸ¦‹ Parameters πŸ¦‹

  • input=name[,name,...] [required] β€” the 2D raster maps that represent the slices. yes you can pass several, comma-separated, go off πŸ‘‘
  • output=name [required] β€” the name for your output 3D raster map. name her something cute ✨
  • tilesize=integer β€” the maximum tile size in kilo bytes. default is 32KB. Default: 32

πŸ’œ DESCRIPTION πŸ’œ

so r.to.rast3 converts 2D raster map(s) into one raster3D map. periodt. πŸŽ€

but listen, it is important to properly set the 3D region settings β€” especially the number of layers and the depth of layers. if your 2D and 3D region settings are different, the 2D resolution will be adjusted to the 3D resolution. it's like when your outfit doesn't match your plans and you have to change one of them 😭

How r.to.rast3 works 🧚


🌟 NOTES 🌟

  • every 2D raster map is copied as one slice to the raster3D map. slices are counted from bottom to the top, so the bottom slice has to be number 1. no negotiating, algorithms are like that 😀
  • if fewer 2D raster maps are provided than defined depths, the last given 2D map is used to fill up the remaining raster3D slices to the top. she's a filler, she's an icon, she's a legend 🌈

πŸ”₯ EXAMPLES πŸ”₯

EXAMPLE 1 πŸ’–

this example shows how to convert 6 maps into one 3D map with 6 layers.

# Mapset data in dataset slovakia3d
g.region raster=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 -p
g.region b=0 t=600 tbres=100 res3=100 -p3
r.to.rast3 input=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 output=new_3dmap

EXAMPLE 2 πŸ’…

this example shows how to convert 3 maps into one 3D map with 6 layers. (yes, three in, six out β€” the last one got promoted to cover the rest 🫑)

# Mapset data in dataset slovakia3d
g.region b=0 t=600 tbres=100 res3=100 -p3
r.to.rast3 input=prec_1,prec_2,prec_3 output=new_3dmap

πŸ‘€ SEE ALSO πŸ‘€

g.region, r3.to.rast, r.to.rast3elev

go read them, they're all in the family 🫢


πŸ’« AUTHOR πŸ’«

Soeren Gebbert


πŸ“¦ SOURCE CODE πŸ“¦

available at: r.to.rast3 source code (history)

latest change: Tuesday Feb 18 17:20:26 2025 in commit: 688e625e7db3be9a465ce99ba25f36d2ebdd5aeb

Main index | Raster index | Topics index | Keywords index | Graphical index | Full index

Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual


okay that's the whole thing bestie, no cap, every flag and every number is in there πŸ’– GRASS 8.5.0, Β© 2003-2026 GRASS Development Team, and the manual page is r.to.rast3(1grass) β€” now go stack those slices and slay πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from