r3.gradient(1grass)

πŸ’– r3.gradient πŸ’–

okay bestie, this is r3.gradient from the GRASS User's Manual, and it's literally the girl who looks at your 3D raster and tells you which way everything is sloping. no cap. πŸ¦‹

KEYWORDS: raster3d, gradient, voxel


✨ NAME ✨

r3.gradient β€” converts a 3D raster map into gradient components. 🌈


πŸŽ€ SYNOPSIS πŸŽ€

r3.gradient
r3.gradient --help
r3.gradient input=name
output=grad_x,grad_y,grad_z[,grad_x,grad_y,grad_z,...]
[blocksize=size_x,size_y,size_z[,size_x,size_y,size_z,...]]
[--overwrite]  [--help]  [--verbose]  [--quiet]  [--ui]

🌸 Flags 🌸

  • --overwrite β€” let those output files just bulldoze whatever's already sitting there with the same name. say yes to chaos πŸ’…
  • --help β€” prints the usage summary so you're not out here guessing.
  • --verbose β€” verbose module output, aka the module tells you everything it's doing.
  • --quiet β€” quiet module output, aka shhh 🀫.
  • --ui β€” force launches the GUI dialog. main character GUI energy only.

πŸ“ Parameters πŸ“

  • input=name [required] β€” the name of the input 3D raster map. your lil voxel baby you're feeding in. 🫢
  • output=grad_x,grad_y,grad_z[,grad_x,grad_y,grad_z,...] [required] β€” name for the output 3D raster map(s). notice the pattern, bestie: you give it triples. x, y, z, x, y, z… it's giving "three components per gradient field" ✨
  • blocksize=size_x,size_y,size_z[,size_x,size_y,size_z,...] β€” size of blocks. same triple situation. default is 30,30,20 🧚

🌟 DESCRIPTION 🌟

So. Module r3.gradient computes the gradient from a 3D raster map. that's it, that's the whole job.

The results? three 3D raster maps describing the x, y, and z components of the computed gradient field. three maps, three components, one very slay gradient field. πŸ”₯


πŸ‘‘ EXAMPLES πŸ‘‘

okay here's the whole glow-up in action:

# create a 3D raster
g.region s=0 n=100 w=0 e=100 b=0 t=100 -p
r3.mapcalc "test_gradient = sqrt(row()*row() +col()*col()+ depth()*depth())"
# compute gradient
r3.gradient input=test_gradient output=grad_x,grad_y,grad_z

first you set the region, then r3.mapcalc builds you a lil test field, then r3.gradient eats it and hands you back grad_x, grad_y and grad_z. ate. πŸ’…


πŸ¦‹ SEE ALSO πŸ¦‹

r3.flow, r.flow β€” go read those too, iykyk πŸ’œ


🌈 AUTHOR 🌈

Anna Petrasova, NCSU GeoForAll Lab, developed during GSoC 2014. queen behavior, honestly. πŸ‘‘


πŸ’« SOURCE CODE πŸ’«

Available at: r3.gradient source code (history)

Latest change: Monday Nov 03 07:16:48 2025 in commit: c96796774942e46bbababcd652d3986d4e295665

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


and that's the whole page, bestie!! this was the r3.gradient(1grass) manual, pulled straight from GRASS 8.5.0, and Β© 2003-2026 belongs to the GRASS Development Team β€” GRASS 8.5.0 Reference Manual. thanks for reading, mwah πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«Ά

πŸ“¦ where this page comes from