r.li.padsd(1)
r.li.padsd π β¨
okay bestie, this is r.li.padsd from the GRASS GIS User's Manual β a lil module that does landscape structure analysis and is lowkey obsessed with patch index stuff. it lives in the raster world. let's go π¦
β¨ NAME β¨
r.li.padsd β calculates standard deviation of patch area for a raster map π
πΈ 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β allow output files to overwrite existing files (yes it will actually do that, be brave)--helpβ print usage summary--verboseβ verbose module output (it talks more, we love a chatty king)--quietβ quiet module output (shhh era)--uiβ force launching GUI dialog
π¦ Parameters:
input=name[required] β name of input raster mapconfig=name[required] β configuration fileoutput=name[required] β name for output raster map
π DESCRIPTION π
so r.li.padsd calculates the standard deviation of patch area sizes in hectares, and it does it like this:
with:
- MPS: mean patch area size
- ai: area of patch i
- Npatch: number of patches
ngl the actual formula is not spelled out in this manual page β the text literally just says "as:" and then "with:" and then these definitions, so that's exactly what you're getting. no cap, no guessing, we don't invent math here π
this index gets calculated using a 4 neighbour algorithm β meaning diagonal cells are ignored when tracing a patch. periodt. π
π§ NOTES π§
do NOT use absolute path names for the config and output file/map parameters. like, seriously. it's giving chaos.
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 is empty, bestie π
π EXAMPLES π
wanna calculate the patch area distribution standard deviation index on map my_map, using my_conf configuration file (which you already defined with g.gui.rlisetup) and save the results in my_out? say less, run this:
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, g.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)
π AUTHORS π
- Michael Shapiro - CERL (patch identification)
- Markus Metz (statistics)
β SOURCE CODE β
Available at: r.li.padsd source code (history)
Accessed: Saturday Jan 17 05:40:54 2026
Main index | Raster index | Topics index | Keywords index | Graphical index | Full index
okay that's the whole thing bestie, you ate π β¨ this was brought to you by GRASS GIS 8.4.2 (that's the version in the footer, fr fr), the GRASS GIS 8.4.2 Reference Manual, and Β© 2003-2025 GRASS Development Team. mwah, go map something iconic π¦πΈπ
π¦ 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