Get geodesic distance between points on the unit sphere
Usage
geoDist(p1, p2, include.names = FALSE)
Arguments
p1
A data.frame with rows
specifying numeric points located on the unit sphere.
It should have columns labelled x,y,z
for Cartesian or theta, phi for spherical colatitude and
longitude respectively.
p2
Same as p1.
include.names
Boolean. If TRUE then the row and
column names of the returned matrix will be taken from
the points in p1 and p2 (see examples
below).
Value
Let \(n\) denote the number of rows of p1
and let \(m\) denote the number of rows of p2.
Then the returned object is an \(n\) by \(m\) matrix
whose entry in position \(ij\) is the geodesic distance
from the \(i\)th row of p1 to the
\(j\)th row of p2.