stamp.direction: Perform polygon directional analysis

View source: R/stamp.direction.r

stamp.directionR Documentation

Perform polygon directional analysis

Description

stamp.direction facilitates polygon directional analysis using a variety of methods.

Usage

stamp.direction(stmp, dir.mode = "CentroidAngle", ndir = 4, group = FALSE)

Arguments

stmp

a sf object generated from the stamp function.

dir.mode

a character item identifying which directional relations method is to be used. See Details for information on each individual method.

ndir

(optional) parameter identifying the number of directions to be computed. See individual method Details for appropriate usage.

group

(optional) a logical value identifying whether direction should be computed on groups or individual event polygons (only used with CentroidAngle method).

Details

The stamp.direction function can be used to facilitate directional analysis on output stamp.obj objects from function stamp. Currently, four directional analysis methods are available:

  • "CentroidAngle" – The centroid angle is simply the angle between the centroids of two polygons. The centroid angle method is computed on STAMP objects by first grouping all T1 polygons (by STAMP group) and computing their centroid. Then, the angle from each T1 group centroid, to the centroid of each STAMP event within the group is calculated. Centroid angles are recorded in degrees, with North having a value of 0, East 90, and so on. "CentroidAngle" ignores the ndir parameter.

  • "ConeModel" – The cone model method calculates areas of STAMP event polygons within cones radiating from the centroid of the origin polygon. The cone model method first computes the centroid of all T1 polygons in a STAMP grouping. It then computes ndir equally spaced cones radiating outward from the T1 centroid. The first cone is always centered on North, but there can be any number of cones. The area of each STAMP event, in each cone (specifying direction), is then calculated. See Peuquet and Zhang (1987) for more detailed information

  • "MBRModel" – The minimum bounding rectangle (MBR) method first computes the MBR for all T1 events in a STAMP grouping. Then the lines of four edges of the MBR are extended outwards to infinity creating sections for the eight cardinal directions around the MBR, along with the MBR itself. The area of each stamp event within each of the nine sections is then computed. See Skiadopoulos et al. (2005) for more detailed information. "MBRModel" ignores the ndir parameter.

  • "ModConeModel" – The modified cone model first computes the centroid of the T1 events. Then ndir = 4 or 8 cones are created outward from this centroid to the minimum bounding rectangle of the entire grouping. As described by Robertson et al. (2007) this approach is more accommodating to polygon groups that are irregular in size or shape. The modified cone model method first computes the centroid of all T1 polygons in a STAMP grouping. It then computes the bounding box of ALL events in a STAMP grouping. Then, ndir=4 or 8 cones are computed. In the case of ndir=4, cones radiate from the T1 centroid to the four corners of the bounding box. The result of the modified cone model method is that the cones are not equally spaced, but tailored to the individual STAMP groupings shape. See Robertson et al. (2007) for more detailed information. NOTE: This function has been altered slightly as of stampr v 0.3.

As of V 0.3 all operations are conducted using sf object classes, all directional (azimuth) and area calculations use WGS84.

Value

Appends the input stamp object with appropriate columns for the directional analysis chosen, if dir.mode is:

"CentroidAngle"

A single column with centroid angle results, in degrees (North = 0 degrees). If group=TRUE then values are identical for all event polygons in the group.

"ConeModel"

ndir new columns with the area (m2) of the STAMP event in each direction, named appropriately (e.g., as DIR45, where 45 refers to the mid-point of that directional cone).

"MBRModel"

9 new columns with the area (m2) of the STAMP event in each direction, named appropriately as, for example, "MBR_SW","MBR_S",... etc.

"ModConeModel"

ndir new columns with the area (m2) of the STAMP event in each direction, named appropriately as, for example, "MC4_N","MC8_SE", ... etc.

Note: STAMP events that are singular (i.e., only 1 polygon in the group) will have NA's from directional analysis.

References

Robertson, C., Nelson, T., Boots, B., and Wulder, M. (2007) STAMP: Spatial-temporal analysis of moving polygons. Journal of Geographical Systems, 9:207-227.

Peuquet, D., Zhang, C.X. (1987) An algorithm to determine the directional relationship between arbitrarily-shaped polygons in the plane. Pattern Recognition, 20:65-74.

Skiadopoulos, S. Giannoukos, C., Sarkas, N., Vassiliadis, P., Sellis, T., and Koubarakis, M. (2005) Computing and managing directional relations. IEEE Transactions on Knowledge and Data Engineering, 17:1610-1623.

See Also

stamp stamp.distance


stampr documentation built on April 28, 2023, 1:10 a.m.