Description Usage Arguments Details Value Examples
geodist
computes the distance between the
coordinates in coords1
and coords2
. If
coords2
isn't supplied, then the distances are
computed between the coordinates in coords1
alone.
Otherwise, the pairwise distances between then points in
coords1
and coords2
is computed. If
longlat = TRUE
, then the great circle distance is
computed.
1 |
coords1 |
A two-dimensional matrix of coordinates. |
coords2 |
A two-dimensional matrix of coordinates. |
longlat |
A logical value indicating whether
Euclidean distance ( |
The algorithm used when longlat = TRUE
is a C++
port of the C code written by Roger Bivand for
spDists
, which appears to be based on a
special case of the Vincenty formula with a slight
correction based on the WGS84 flattening constant. See
https://en.wikipedia.org/wiki/Great-circle_distance.
A matrix of distances
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.