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
- 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