Skip to content

r.le.patch

Calculates attribute, patch size, core (interior) size, shape, fractal dimension, and perimeter measures for sets of patches in a landscape.

r.le.patch [-cnptu] map=string [sam=string] [reg=string] [att=string [,string,...]] [siz=string [,string,...]] [co1=integer] [co2=string [,string,...]] [sh1=string] [sh2=string [,string,...]] [bnd=string [,string,...]] [per=string [,string,...]] [out=string] [--verbose] [--quiet] [--qq] [--ui]

Example:

r.le.patch map=string

grass.script.run_command("r.le.patch", map, sam="w", reg=None, att=None, siz=None, co1=None, co2=None, sh1=None, sh2=None, bnd=None, per=None, out=None, flags=None, verbose=False, quiet=False, superquiet=False)

Example:

gs.run_command("r.le.patch", map="string")

Parameters

map=string [required]
    Raster map to be analyzed
sam=string
    Sampling method (choose only 1 method): \

    w = whole map u = units m = moving window r = regions
    Default: w
reg=string
    Name of regions map, only when sam = r; omit otherwise
att=string [,string,...]
    a1 = mn. pixel att.         a2 = s.d. pixel att.\     a3 = mn. patch att.         a4 = s.d. patch att.\     a5 = cover by gp         a6 = density by gp\     a7 = total density         a8 = eff. mesh number
    Allowed values: a1, a2, a3, a4, a5, a6, a7, a8
siz=string [,string,...]
    s1 = mn. patch size        s2 = s.d. patch size\     s3 = mn. patch size by gp    s4 = s.d. patch size by gp \     s5 = no. by size class        s6 = no. by size class by gp\     s7 = eff. mesh size         s8 = deg. landsc. division
    Allowed values: s1, s2, s3, s4, s5, s6, s7, s8
co1=integer
    Depth-of-edge-influence in pixels (integer) for use with co2
co2=string [,string,...]
    Core size measures (required if co1 was specified):\     c1 = mn. core size        c2 = s.d. core size\     c3 = mn. edge size        c4 = s.d. edge size\     c5 = mn. core size by gp    c6 = s.d. core size by gp\     c7 = mn. edge size by gp    c8 = s.d. edge size by gp\     c9 = no. by size class        c10 = no. by size class by gp
    Allowed values: c1, c2, c3, c4, c5, c6, c7, c8, c9, c10
sh1=string
    Shape index (choose only 1 index):\     m1 = per./area m2 = corr. per./area m3 = rel. circum. circle
sh2=string [,string,...]
    Shape measures (required if sh1 was specified):\     h1 = mn. patch shape        h2 = s.d. patch shape\     h3 = mn. patch shape by gp    h4 = s.d. patch shape by gp\     h5 = no. by shape class     h6 = no. by shape class by gp
    Allowed values: h1, h2, h3, h4, h5, h6
bnd=string [,string,...]
    n1 = mn. twist number n2 = s.d. twist number\     n3 = mn. omega index n4 = s.d. omega index
    Allowed values: n1, n2, n3, n4
per=string [,string,...]
    p1 = sum of perims.        p4 = sum of perims. by gp\     p2 = mn. per.            p5 = mn. per. by gp\     p3 = s.d. per.            p6 = s.d. per. by gp
    Allowed values: p1, p2, p3, p4, p5, p6
out=string
    Name of output file for individual patch measures, when sam=w,u,r;\     if out=head, then column headings will be printed
-c
    Output map 'interior' with patch cores (specify co1 & co2)
-n
    Output map 'num' with patch numbers
-p
    Include sampling area boundary as perimeter
-t
    Use 4 neighbor instead of 8 neighbor tracing
-u
    Output maps 'units_x' with sampling units for each scale x
--help
    Print usage summary
--verbose
    Verbose module output
--quiet
    Quiet module output
--qq
    Very quiet module output
--ui
    Force launching GUI dialog

map : str, required
    Raster map to be analyzed
    Used as: input, raster
sam : str, optional
    Sampling method (choose only 1 method): \

    w = whole map u = units m = moving window r = regions
    Default: w
reg : str, optional
    Name of regions map, only when sam = r; omit otherwise
    Used as: input, raster
att : str | list[str], optional
    a1 = mn. pixel att.         a2 = s.d. pixel att.\     a3 = mn. patch att.         a4 = s.d. patch att.\     a5 = cover by gp         a6 = density by gp\     a7 = total density         a8 = eff. mesh number
    Allowed values: a1, a2, a3, a4, a5, a6, a7, a8
siz : str | list[str], optional
    s1 = mn. patch size        s2 = s.d. patch size\     s3 = mn. patch size by gp    s4 = s.d. patch size by gp \     s5 = no. by size class        s6 = no. by size class by gp\     s7 = eff. mesh size         s8 = deg. landsc. division
    Allowed values: s1, s2, s3, s4, s5, s6, s7, s8
co1 : int, optional
    Depth-of-edge-influence in pixels (integer) for use with co2
co2 : str | list[str], optional
    Core size measures (required if co1 was specified):\     c1 = mn. core size        c2 = s.d. core size\     c3 = mn. edge size        c4 = s.d. edge size\     c5 = mn. core size by gp    c6 = s.d. core size by gp\     c7 = mn. edge size by gp    c8 = s.d. edge size by gp\     c9 = no. by size class        c10 = no. by size class by gp
    Allowed values: c1, c2, c3, c4, c5, c6, c7, c8, c9, c10
sh1 : str, optional
    Shape index (choose only 1 index):\     m1 = per./area m2 = corr. per./area m3 = rel. circum. circle
sh2 : str | list[str], optional
    Shape measures (required if sh1 was specified):\     h1 = mn. patch shape        h2 = s.d. patch shape\     h3 = mn. patch shape by gp    h4 = s.d. patch shape by gp\     h5 = no. by shape class     h6 = no. by shape class by gp
    Allowed values: h1, h2, h3, h4, h5, h6
bnd : str | list[str], optional
    n1 = mn. twist number n2 = s.d. twist number\     n3 = mn. omega index n4 = s.d. omega index
    Allowed values: n1, n2, n3, n4
per : str | list[str], optional
    p1 = sum of perims.        p4 = sum of perims. by gp\     p2 = mn. per.            p5 = mn. per. by gp\     p3 = s.d. per.            p6 = s.d. per. by gp
    Allowed values: p1, p2, p3, p4, p5, p6
out : str, optional
    Name of output file for individual patch measures, when sam=w,u,r;\     if out=head, then column headings will be printed
flags : str, optional
    Allowed values: c, n, p, t, u
    c
        Output map 'interior' with patch cores (specify co1 & co2)
    n
        Output map 'num' with patch numbers
    p
        Include sampling area boundary as perimeter
    t
        Use 4 neighbor instead of 8 neighbor tracing
    u
        Output maps 'units_x' with sampling units for each scale x
verbose: bool, optional
    Verbose module output
    Default: False
quiet: bool, optional
    Quiet module output
    Default: False
superquiet: bool, optional
    Very quiet module output
    Default: False

DESCRIPTION

The r.le.patch module calculates attribute, patch size, core (interior) size, shape, fractal dimension, and perimeter measures for sets of patches in a landscape.

NOTES

Full instructions can be found in the r.le manual (see "REFERENCES" section below) and the r.le.setup help page.

REFERENCES

Baker, W.L. and Y. Cai. 1992. The r.le programs for multiscale analysis of landscape structure using the GRASS geographical information system. Landscape Ecology 7(4):291-302.

The r.le manual: Quantitative analysis of landscape structures (GRASS 5; 2001)

SEE ALSO

r.le.pixel, r.le.setup, r.le.trace

AUTHOR

William L. Baker Department of Geography and Recreation University of Wyoming Laramie, Wyoming 82071 U.S.A.

SOURCE CODE

Available at: r.le.patch source code (history)
Latest change: Thursday Feb 20 13:02:26 2025 in commit 53de819