stamp.distance: stamp.distance

Description Usage Arguments Details Value References See Also

View source: R/stamp.distance.r

Description

The function stamp.distance can be used to compute various measures of distance between polygon events and groups. In turn, distance measurements can be used to estimate the velocity of polygon movement.

Usage

1
stamp.distance(stmp, dist.mode = "Centroid", group = FALSE)

Arguments

stmp

a SpatialPolygonsDataFrame object generated from the stamp function.

dist.mode

Character determining the emethod by which polygon distances are computed. If "Centroid" then the centroid distance is calculated, if "Hausdorff" then the discrete Hausdorff distance is calculated; see Details.

group

logical indicating whether distances should be computed from the T1 polygon to each individual stamp event (group = FALSE – the default), or whether T2 polygons should combined (through a spatial union) in order to compute the measure of distance for each stamp group (group = TRUE)

Details

stamp.distance computes distance between polygon sets based on either centroid or Hausdorff distance calculations. Centroid distance is simply the distance from the centroid of all T1 polygons (combined) to each stamp event (group = FALSE), or to the union of all T2 polygons within a group (group = TRUE), in the second case, all events within a group are given an identical distance value.

The Hausdorff distance calculation uses the discrete version of the Hausdorff distance, as programmed in the rgeos function gDistance. A value of densifyFrac = 1 is used to increase the precision of this measurement – see help(gDistance). The returned distance is then the Hausdorff distance of all T1 polygons (combined) to each stamp event (group = FALSE), or to the union of all T2 polygons within a group (group = TRUE), in the second case, all events within a group are given an identical distance value.

Value

Appropriately named columns (e.g., CENDIST or HAUSDIST) in the stamp SpatialPolygonsDataFrame object.

References

Hausdorff Distance: http://en.wikipedia.org/wiki/Hausdorff_distance

See Also

stamp stamp.direction stamp.shape gDistance


colinr23/stampr documentation built on May 13, 2019, 9:54 p.m.