arcdistmat {icosa} | R Documentation |
Calculation of distance matrices along arcs
Description
This function calculates the shortest arc distance matrix between two sets of points.
Usage
arcdistmat(
points1,
points2 = NULL,
origin = c(0, 0, 0),
output = "distance",
radius = authRadius
)
Arguments
points1 |
( |
points2 |
( |
origin |
( |
output |
( |
radius |
( |
Details
This function will create all possible shortest arc distances between points in the two sets,
but not between the points within the sets. The function is useful for great circle distance calculations.
For a symmetrical distance matrix leave the points2
argument empty.
Value
A single numeric
value.
Examples
g <- trigrid(c(4))
res <- arcdistmat(g@vertices)
rand<-rpsphere(500)
res2 <- arcdistmat(g@vertices, rand)