r3.gradient(1)
β¨ r3.gradient β¨
okay bestie, welcome to the GRASS GIS User's Manual π this one's all about r3.gradient, and no cap, it's a bop.
πΈ NAME πΈ
r3.gradient β it computes the gradient of a 3D raster map and outputs the gradient components as three 3D raster maps. literally that's the whole gig π«Ά
π KEYWORDS π
raster3d, gradient, voxel
β¨ 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β lets your output files just bulldoze over existing files. iconic but also, be careful bestie π--helpβ prints the usage summary so you're not out here guessing--verboseβ verbose module output, aka it tells you everything--quietβ quiet module output, aka it tells you nothing (respect)--uiβ forces the GUI dialog to launch. main character energy, go off πͺ
π Parameters π
input=name[required] β the name of your input 3D raster mapoutput=grad_x,grad_y,grad_z[,grad_x,grad_y,grad_z,...][required] β name(s) for your output 3D raster map(s)blocksize=size_x,size_y,size_z[,size_x,size_y,size_z,...]β the size of blocks- Default:
30,30,20
- Default:
π DESCRIPTION π
so what does r3.gradient actually do, you ask? it computes the gradient from a 3D raster map, periodt. the results? three whole 3D raster maps, and they describe the x, y, z components of the computed gradient field. three maps. three axes. it's giving coordinate slay π
β¨
π EXAMPLES π
first up, create a 3D raster:
# 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
and that's it. you just did that. ate and left no crumbs π₯
π§ SEE ALSO π§
r3.flow, r.flow
π AUTHOR π
Anna Petrasova, NCSU GeoForAll Lab, developed during GSoC 2014. periodt, we stan π
β SOURCE CODE β
Available at: r3.gradient source code (history)
Accessed: Saturday Jan 17 05:41:14 2026
Main index | 3D raster index | Topics index | Keywords index | Graphical index | Full index
Β© 2003-2025 GRASS Development Team, GRASS GIS 8.4.2 Reference Manual
and that's the whole page bestie π«Ά this was r3.gradient, running under GRASS 8.4.2, and you understood every word of it. no cap, obsessed ππΈβ¨
π¦ 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