r3.cross.rast(1grass)

πŸ’– r3.cross.rast πŸ’–

okay so bestie, this is the GRASS User's Manual page for r3.cross.rast, and it is literally the glow-up tool that takes a whole 3D raster vibe and slices a cute lil 2D cross section out of it. obsessed.

KEYWORDS: raster3d, profile, raster, voxel ✨


✨ SYNOPSIS ✨

r3.cross.rast
r3.cross.rast --help
r3.cross.rast [-m] input=string elevation=string output=string
[--overwrite]  [--help]  [--verbose]  [--quiet]  [--ui]

πŸŽ€ Flags

  • -m β€” use the 3D raster mask (if one exists) together with the input map. like, mask it up πŸ’…
  • --overwrite β€” lets output files overwrite files that already exist. no "oops it's taken" drama.
  • --help β€” prints the usage summary, aka the cheat sheet 🫢
  • --verbose β€” verbose module output (she talks a lot, we love her)
  • --quiet β€” quiet module output (she's giving mysterious)
  • --ui β€” force launching the GUI dialog

🌸 Parameters

  • input=string [required] β€” the input 3D raster map you're slicing your cross section out of
  • elevation=string [required] β€” the 2D elevation map used to create the cross section map
  • output=string [required] β€” the resulting cross section 2D raster map, your main character artifact πŸ‘‘

πŸ’œ DESCRIPTION πŸ’œ

so r3.cross.rast creates a cross section 2D map from one 3D raster volume map, based on a 2D elevation map. that's the whole plot.

here's the mechanics, no cap: it checks if the value of the elevation map is located in the z-coordinate space of the 3D map. if it IS, then the 3D voxel value for this position gets transferred to the related cross section output map cell πŸŽ€. otherwise, the NULL value is set. that's it, that's the algorithm, slay.

How r3.cross.rast works

and just so you know bestie: if the 2D and 3D region settings are different, the 2D resolution will be adjusted to the 3D resolution. they gotta match, it's giving couple goals.


🌈 NOTES 🌈

to create a cut plane elevation map, use r.mapcalc. some examples, periodt:

  • To create a cut plane elevation map in x direction type
r.mapcalc "cutplane = col()*x",

with x being the value for the elevation. If the range of col() is 1 ... 10, the elevation map has the range 1 ... 10 if x == 1 and if x == 10 the range 10 ... 100 🌸

  • To create a cut plane elevation map in y direction type
r.mapcalc "cutplane = row()*x",

with x being the value for the elevation. If the range of col() is 1 ... 10, the elevation map has the range 1 ... 10 if x == 1 and if x == 10 the range 10 ... 100 ✨

  • The user can also make a cut in y and x direction with r.mapcalc by using
r.mapcalc "cutplane = (row()+col())*x"

πŸ”₯ EXAMPLES πŸ”₯

πŸ’– Simple Spearfish example πŸ’–

g.region -d
g.region res=150 res3=150 t=1000 b=0 tbres=100
# synthetic data, could be geological structures:
r3.mapcalc "map3d = sin(row())+sin(col())+sin(depth()*depth())"
#create a cutplane map
r.mapcalc "cutplane = col()*10"
#create the cross section map
r3.cross.rast input=map3d elevation=cutplane output=crosssection

like, look at that. g.region -d, set your resolution and your 3D bounds with res=150 res3=150 t=1000 b=0 tbres=100, cook up some "synthetic data, could be geological structures" with r3.mapcalc, cut yourself a plane with r.mapcalc "cutplane = col()*10", and boom β€” cross section. ate. πŸ‘‘


πŸ‘€ SEE ALSO πŸ‘€

  • g.region
  • r.mapcalc
  • r3.mapcalc
  • r3.to.rast

iykyk 🌈


🫢 AUTHOR 🫢

SΓΆren Gebbert


🧚 SOURCE CODE 🧚

Available at: r3.cross.rast source code (history)

Latest change: Saturday Jul 26 17:35:15 2025 in commit: ab6f35014ec46c07f76b93fa6268ef9e4fa4b3b2

Main index | 3D raster 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, brought to you by GRASS 8.5.0 🌸 no cap, go slice some voxels πŸ’…βœ¨

πŸ“¦ where this page comes from