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