r.to.rast3elev(1)
π r.to.rast3elev β the GRASS GIS glow-up π
okay bestie, so you know how we're in r.to.rast3elev(1)? That's the manual page name, and this is the GRASS GIS User's Manual, and honestly? It's giving volume-builder energy. Let's go π¦
β¨ NAME β¨
r.to.rast3elev β creates a 3D volume map based on 2D elevation and value raster maps.
no cap, that's literally it. 2D in, 3D out. main character transformation π
π KEYWORDS π
raster, conversion, raster3d, voxel
πΈ SYNOPSIS πΈ
r.to.rast3elev
r.to.rast3elev --help
r.to.rast3elev [-ulm] input=name[,name,...] elevation=name[,name,...]
output=name [upper=float] [lower=float] [tilesize=integer]
[--overwrite] [--help] [--verbose] [--quiet] [--ui]
π«Ά Flags:
-uβ use the input map values to fill the upper cells β¬οΈ-lβ use the input map values to fill the lower cells β¬οΈ-mβ use 3D raster mask (if it exists, like, if it doesn't exist we can't do anything about that bestie) with input map π--overwriteβ allow output files to overwrite existing files (yes, it will actually do it, be careful π)--helpβ print usage summary--verboseβ verbose module output (she's chatty)--quietβ quiet module output (she's mysterious)--uiβ force launching GUI dialog
β Parameters:
input=name[,name,...][required]β name of input raster map(s). You can hand her a whole little list, separated by commas, she's flexible like that.elevation=name[,name,...][required]β name of input elevation raster map(s). Also list-friendly. β¨output=name[required]β name for output 3D raster map. This is your baby, name her well.upper=floatβ the value to fill the upper cells, default is nulllower=floatβ the value to fill the lower cells, default is nulltilesize=integerβ the maximum tile size in kilo bytes. Default is 32KB.- Default:
32
- Default:
π¦ DESCRIPTION π¦
r.to.rast3elev creates a 3D volume map based on 2D elevation and value raster maps. That's the whole vibe. Elevation says where, value raster says what, and boom β voxels. π§
If the 2d and 3d region settings are different, the 2d resolution will be adjust to the 3d resolution. (Yes, the original says "will be adjust". We're quoting the energy, not fixing the grammar. Not me being a copy editor on a manpage π)
How r.to.rast3elev works
π₯ NOTES π₯
The height of the 2D elevation maps will be used to verify the position within the 3D region. If the cell value of the elevation raster maps is located within the 3D region, the cell value of the appropriate 2D input raster maps will be written to the associated 3D cell. So like, the elevation map is basically the bouncer at the door checking who's inside the 3D region π
There are flags and options to fill the upper and lower 3D cells with a specific value, or the input raster maps values. Your choice, your era. π
π EXAMPLES π
Simple Spearfish sample data set example
g.region raster=elevation.10m -p
g.region res=200 res3=200 t=2000 b=0 tbres=20 -p
# Write the values of raster map soils based on the elevation of elevation.10m
# to the 3D map volev
r.to.rast3elev in=soils elev=elevation.10m out=volev
# Write the values of map soils based on the elevation of elevation.10m
# to the 3D map volev_l and fill the lower cells with the soils map values
r.to.rast3elev in=soils elev=elevation.10m out=volev_l -l
# Write the values of map soils based on the elevation of elevation.10m
# to the 3D map volev_u and fill the upper cells with the soils map values
r.to.rast3elev in=soils elev=elevation.10m out=volev_u -u
# Example with multiple elevation maps.
## first we need three support maps
r.mapcalc expression="one = 1"
r.mapcalc expression="two = 2"
r.mapcalc expression="three = 3"
## Now we generate the new evelation maps
r.mapcalc expression="elev_mid = elevation.10m - 500"
r.mapcalc expression="elev_bottom = elevation.10m - 1000"
## Now fill the lower cells below the elevation maps with the values one, two and three
r.to.rast3elev -l input=one,two,three elevation=elevation.10m,elev_mid,elev_bottom output=threelayer
## Export the map for visualization with paraview (https://www.paraview.org)
## By default the null value is -9999.99, we adjust it to 0.0 for
## better visualization
r3.out.vtk null=0.0 input=threelayer output=/tmp/threelayer.vtk
# Start paraview
paraview --data=/tmp/threelayer.vtk
# Note: First you need to choose the surface representation style and
# then color by "threelayer" in paraview.
(And yes, evelation in that comment is exactly how it's spelled in the original. We keep it, it's iconic. π)
π SEE ALSO π
r.to.rast3, r3.cross.rast, g.region
like, go read those too, they're all in the same friend group π«Ά
π AUTHOR π
Soeren Gebbert
π SOURCE CODE π
Available at: r.to.rast3elev source code (history)
Accessed: Saturday Jan 17 05:41:03 2026
Main index | Raster index | Topics index | Keywords index | Graphical index | Full index
Β© 2003-2025 GRASS Development Team, GRASS GIS 8.4.2 Reference Manual
okay that's the whole page, you ate that bestie π
β¨ this was GRASS 8.4.2 and the page is r.to.rast3elev(1) β now go build some voxels, periodt. ππ¦
π¦ 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