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 map
  • config=name [required] β€” the configuration file
  • output=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 the config and output file/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 hi
  • 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) β€” 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