r.li.padsd(1grass)
π r.li.padsd π
okay bestie, welcome to r.li.padsd from the GRASS User's Manual β she's a raster girlie and she's here to do exactly one thing and do it gorgeously π
β¨ NAME β¨
r.li.padsd β calculates the standard deviation of patch area in a raster map. yeah. that's the whole gig. and she ate.
π·οΈ KEYWORDS π·οΈ
raster, landscape structure analysis, patch index πΈ
π¦ SYNOPSIS π¦
r.li.padsd
r.li.padsd --help
r.li.padsd input=name config=name output=name [--overwrite] [--help]
[--verbose] [--quiet] [--ui]
π Flags:
--overwriteβ let the output files just bulldoze over existing files, no questions asked. chaos but make it consensual β¨--helpβ prints the usage summary so you're not out here guessing, bestie--verboseβ verbose module output, she tells you everything, main character energy fr--quietβ quiet module output, she says nothing, mysterious queen π--uiβ force-launches the GUI dialog, for when the terminal is giving too much
π Parameters:
input=name[required]β name of the input raster mapconfig=name[required]β the configuration fileoutput=name[required]β the name you're giving your output raster map
π DESCRIPTION π
r.li.padsd calculates the standard deviation of patch area sizes in hectares, like this:
with:
- MPS: mean patch area size
- ai: area of patch i
- Npatch: number of patches
lowkey iconic math ngl.
This index is calculated using a 4 neighbour algorithm β meaning diagonal cells are ignored when tracing a patch. diagonals simply do not exist to her. not invited. periodt π«
π NOTES π
do NOT use absolute path names for theconfigandoutputfile/map parameters. she will not understand you. do not do it. that's the rule.
If the "moving window" method was selected in g.gui.rlisetup, then the output will be a raster map πΊοΈ β otherwise an ASCII file gets generated in the folder:
C:\Users\userxy\AppData\Roaming\GRASS8\r.li\output\(MS-Windows)$HOME/.grass8/r.li/output/(GNU/Linux)
The result is NULL if the sample area contains only NULL values. empty in, empty out, the vibes are consistent π
π₯ EXAMPLES π₯
Wanna calculate the patch area distribution standard deviation index on map my_map, using the my_conf configuration file (which you already defined with g.gui.rlisetup), and save the results in my_out? say less:
r.li.padsd input=my_map conf=my_conf output=my_out
Forest map (Spearfish sample dataset) example π²:
g.region raster=landcover.30m -p
r.mapcalc "forests = if(landcover.30m >= 41 && landcover.30m <= 43,1,null())"
r.li.padsd input=forests conf=movwindow7 out=forests_padsd_mov7
r.univar forests_padsd_mov7
Forest map (North Carolina sample dataset) example π³:
g.region raster=landclass96 -p
r.mapcalc "forests = if(landclass96 == 5, 1, null() )"
r.li.padsd input=forests conf=movwindow7 out=forests_padsd_mov7
# verify
r.univar forests_padsd_mov7
r.to.vect input=forests output=forests type=area
d.mon wx0
d.rast forests_padsd_mov7
d.vect forests type=boundary
π SEE ALSO π
r.li(package overview) β the whole friend group, go say hig.gui.rlisetup
π REFERENCES π
McGarigal, K., and B. J. Marks. 1995. FRAGSTATS: spatial pattern analysis program for quantifying landscape structure. USDA For. Serv. Gen. Tech. Rep. PNW-351. (PDF) β yes she's a cited academic, she contains multitudes
π AUTHORS π
- Michael Shapiro - CERL (patch identification)
- Markus Metz (statistics)
π» SOURCE CODE π»
Available at: r.li.padsd source code (history)
Latest change: Friday Apr 17 01:04:26 2026 in commit: 32a143358df26b2e518b03c7e0d79541e8d1e5b1
Main index | Raster index | Topics index | Keywords index | Graphical index | Full index
and that's the whole page bestie, you're so welcome π«Ά
Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual β mwah, love u, go map something pretty β¨ππ§
π¦ 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