r3.cross.rast(1)

πŸ’– r3.cross.rast β€” the 3D-to-2D cross section girly πŸ’–

okay bestie, so this is the r3.cross.rast page from the GRASS GIS User's Manual (GRASS 8.4.2, she's fancy). Sit down, hydrate, and let's get into it because this module is genuinely iconic. 🫢


✨ NAME ✨

r3.cross.rast β€” makes a cross section 2D raster map out of a 3D raster map, based on a 2D elevation map. it's giving slice-and-dice, no cap.


🏷️ 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 there even is one) with the input map. so if you've got a mask, she's coming along for the ride.
  • --overwrite β€” allow output files to overwrite existing files. yes, she will absolutely bulldoze what was there before. be aware. πŸ’…
  • --help β€” print usage summary. for when you're lost (same).
  • --verbose β€” verbose module output. she'll tell you everything.
  • --quiet β€” quiet module output. she'll say nothing. mysterious. main character.
  • --ui β€” force launching the GUI dialog. some of us are visual learners, and that's valid.

πŸ¦‹ Parameters πŸ¦‹

  • input=string β€” required. the input 3D raster map you want a cross section of. literally the whole point.
  • 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 masterpiece. 🎨

πŸ’œ DESCRIPTION πŸ’œ

so here's the tea, bestie: r3.cross.rast creates a cross section 2D map from one 3D raster volume map, based on a 2D elevation map.

what it does: it checks if the value of the elevation map is located in the z-coordinate space of the 3D map. if it is β€” slay β€” the 3D voxel value for that position gets transferred to the related cross section output map cell. and if it's not? NULL value gets set. it's giving "you're not on the list, you're not getting in." 😭

How r3.cross.rast works

and if the 2D and 3D region settings are different, the 2D resolution will be adjusted to the 3D resolution. she adapts. she's flexible. periodt.

πŸ“ NOTES πŸ“

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

  • To create a cut plane elevation map in the x direction, type r.mapcalc "cutplane = col()*x", where x is 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 is 10 ... 100. math is mathing. πŸ”₯
  • To create a cut plane elevation map in the y direction, type r.mapcalc "cutplane = row()*x", where x is 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 is 10 ... 100. same energy, different axis. πŸ’«
  • The user can also make a cut in the y and x direction with r.mapcalc by using r.mapcalc "cutplane = (row()+col())*x". both axes at once?? she's doing the most and honestly? we love that for her.

🌸 EXAMPLES 🌸

Simple Spearfish example 🐟

not me dropping the whole thing, here it is verbatim bestie:

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

look at that. clean. gorgeous. the vibes are immaculate. ✨


πŸ‘€ SEE ALSO πŸ‘€

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

go read those too, they're all part of the same friend group. 🫢


πŸ‘‘ AUTHOR πŸ‘‘

SΓΆren Gebbert β€” thank you for your service, king. 🫑


πŸ”— SOURCE CODE πŸ”—

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

Accessed: Saturday Jan 17 05:41:14 2026

Main index | 3D raster index | Topics index | Keywords index | Graphical index | Full index


ok that's the whole page, you made it, I'm so proud of you bestie πŸ₯ΉπŸ’–

and that's the sign-off, babes: this was r3.cross.rast from the GRASS GIS 8.4.2 Reference Manual, Β© 2003-2025 GRASS Development Team β€” and the page was accessed on Saturday Jan 17 05:41:14 2026. go slice some voxels, you absolute legend. πŸ’…πŸŒˆβ­

πŸ“¦ where this page comes from