r.li.edgedensity(1grass)
r.li.edgedensity π
okay bestie, welcome to r.li.edgedensity from the GRASS User's Manual β this is the tool that calculates the edge density index on a raster map using a 4 neighbour algorithm. Yes, four. Not eight. Four. She's simple, she's iconic, she ate. β¨
π NAME π
r.li.edgedensity β Calculates edge density index on a raster map, using a 4 neighbour algorithm.
πΈ KEYWORDS πΈ
raster, landscape structure analysis, patch index
β¨ SYNOPSIS β¨
r.li.edgedensity
r.li.edgedensity --help
r.li.edgedensity [-b] input=name config=name output=name
[patch_type=string] [--overwrite] [--help] [--verbose] [--quiet]
[--ui]
π OPTIONS π
π¦ Flags π¦
-bβ Exclude border edges. literally just say no to the edges on the border, she's got boundaries π--overwriteβ Allow output files to overwrite existing files. live dangerously, bestie--helpβ Print usage summary--verboseβ Verbose module output. she will Not stop talking--quietβ Quiet module output. she's giving mysterious, silent, unbothered--uiβ Force launching GUI dialog
π Parameters π
input=name[required] β Name of input raster mapconfig=name[required] β Configuration fileoutput=name[required] β Name for output raster mappatch_type=stringβ The value of the patch type. It can beinteger,doubleorfloat; it will be changed in function of map type
π DESCRIPTION π
so r.li.edgedensity calculates:
- the density of all edges of patch type
k, or - the density of all edges in the sampling area if
kis not specified,
and here's the little glossary she's working with, no cap:
k: patch typem: number of patch typesn: number of edge segments of patch typekeik:total edge length in the landscape involving patch typekArea: total landscape area
The unit is meters per hectare. periodt. π
π₯ NOTES π₯
Do not use absolute path names for theconfigandoutputfile/map parameters. she said what she said π
If the "moving window" method was selected in g.gui.rlisetup, then the output will be a raster map. Otherwise an ASCII file will be generated in the folder:
C:\Users\userxy\AppData\Roaming\GRASS8\r.li\output\(MS-Windows), or$HOME/.grass8/r.li/output/(GNU/Linux).
okay and if the input raster map contains only NULL values then r.li.edgedensity considers it to have 0 patches.
If area is 0, r.li.edgedensity returns NULL β and heads up, this is only possible if the input raster is masked. π
π EXAMPLES π
To calculate the edge density index on map my_map, using my_conf configuration file (previously defined with g.gui.rlisetup) and saving results in my_out, run:
r.li.edgedensity input=my_map conf=my_conf output=my_out
To calculate edge density index of patch_type 34, using "my_conf" configuration file and on map "my_map", saving results in "my_out" file run:
r.li.edgedensity input=my_map conf=my_conf output=my_out patch_type=34
π 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.edgedensity input=forests conf=movwindow7 out=forests_edgedens_mov7
r.univar forests_edgedens_mov7
π§ Forest map (North Carolina sample dataset) example π§
g.region raster=landclass96 -p
r.mapcalc "forests = if(landclass96 == 5, 1, null() )"
r.li.edgedensity input=forests conf=movwindow7 out=forests_edgedensity_mov7
# verify
r.univar forests_edgedensity_mov7
r.to.vect input=forests output=forests type=area
d.mon wx0
d.rast forests_edgedensity_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 π«
- Serena Pallecchi, student of Computer Science University of Pisa (Italy).
- Commission from Faunalia Pontedera (PI), Italy (www.faunalia.it)
- Markus Metz
π«Ά SOURCE CODE π«Ά
Available at: r.li.edgedensity source code (history)
Latest change: Wednesday Apr 30 17:57:46 2025 in commit: 633b0261cc1d660aa1be383297c3ad1be98f03cd
Main index | Raster index | Topics index | Keywords index | Graphical index | Full index
Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual π¦
and that's the whole page, bestie β r.li.edgedensity in GRASS 8.5.0, last touched Wednesday Apr 30 17:57:46 2025, commit 633b0261cc1d660aa1be383297c3ad1be98f03cd. go calculate some edge density, you icon ππ
π¦ 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