stamp.shape: Compute shape indices on 'stamp' output In stampr: Spatial Temporal Analysis of Moving Polygons

Description

This function computes a suite of shape complexity metrics on STAMP polygons facilitating shape analysis.

Usage

 `1` ```stamp.shape(T1, T2, stmp, index = "PAR") ```

Arguments

 `T1` a `SpatialPolygons` object of polygons from time 1. `T2` a `SpatialPolygons` object of polygons from time 2. `stmp` output `SpatialPolygonsDataFrame` generated from the `stamp` function. `index` a character item identifying which shape metric is to be computed. See Details.

Details

The `stamp.shape` function can be used to perform polygon shape analysis on output polygons from function `stamp`. Shape indices are computed on each output polygon. Five shape indices are available:
`"PER"` – Shape perimeter, in appropriate units.
`"PAR"` – Perimeter-area ratio, in appropriate units;

PAR=p/a

`"FRAC"` – Fractal dimension (Mandelbrot 1977, Lovejoy 1982);

FRAC=2log(p)/log(a)

`"SHPI"` – Shape index (Patton 1975);

SHPI=(p)/2*sqrt(pi*a)

`"LIN"` – Linearity index (Baker and Cai 1992);

LIN=1-(a/a_circ)

Where a is polygon area, p is polygon perimeter, and a_circ is the area of the circumscribing (encompassing) circle of a polygon.

Some Notes:
PER is simply the length of the perimeter, and is not an overly useful measure of shape, but may be useful in direct comparisons. PAR > 0, without limit with larger values sugesting more complex, irregular shapes. The range of FRAC is [1, 2]. FRAC approaches 1 for very simple shapes (squares, circles, etc.) and approaches 2 for complex, convoluted shapes. SHPI > 1 without limit, as SHPI increase, the complexity of the shape increases. The range of LIN is [0, 1]. A perfect circle will have a LIN of 0, while more linear shapes will approach 1.

The indices PAR, FRAC, SHPI, and LIN are all essentially measures of shape complexity. LIN is unique in that it tries to focus on the linearity of the shape by comparing the area to a circle. LIN is however, less useful with STAMP events containing multiple polygons, as the calculation for the circumscribing circle will include all polygon objects within the group and artificially increase the LIN scores.

Value

A `DataFrame` with four columns:
`GROUP` – STAMP polygon groups from the `stamp` function. `T1.INDEX` – shape index value for T1 polygons for each group. `INDEX` is replaced by name of index. `T2.INDEX` – shape index value for T2 polygons for each group. `INDEX` is replaced by name of index. `d.INDEX` – change (t2 - t1) in shape value for each group. `INDEX` is replaced by name of index.

References

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

Lovejoy, S. (1982) Area-perimeter relation for rain and cloud areas. Science, 216(4542):185-187.

Mandlebrot, B.B. (1977) Fractals, Form, Chance and Dimension. W.H Freeman and Co., New York.

Patton, D.R. (1977) A diversity index for quantifying habitat "edge". Wildlife Society Bulletin, 3:171-173.

 ``` 1 2 3 4 5 6 7 8 9 10 11``` ```library(sp) library(rgeos) library(raster) data("fire1") data("fire2") #set globally unique ID column required for stamp function fire1\$ID <- 1:nrow(fire1) #set globally unique ID column required for stamp function fire2\$ID <- (max(fire1\$ID)+1):(max(fire1\$ID) + nrow(fire2)) ch <- stamp(fire1, fire2, dc=1, direction=FALSE, distance=FALSE) ch.sh <- stamp.shape(T1 = fire1, T2 = fire2, stmp = ch, index = 'LIN') ```