stamp.distance {stampr} | R Documentation |
stamp.distance
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
stamp.distance(stmp, dist.mode = "Centroid", group = FALSE)
Arguments
stmp |
a |
dist.mode |
Character determining the method by which polygon distances are computed. If |
group |
logical indicating whether distances should be computed from the T1 polygon to each individual
stamp event ( |
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 Hausdorff distance, as
programmed in the function st_distance
. A value of par = 0.1
is used
to increase the precision of this measurement – see help(st_distance)
. 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.
All distance calculations are computed in meters using the geographical projection WGS84.
Value
Appropriately named columns (e.g., CENDIST
or HAUSDIST
) in the stamp sf
object. Distances are in meters.
References
Hausdorff Distance: https://en.wikipedia.org/wiki/Hausdorff_distance
See Also
stamp stamp.direction