coord2dist | R Documentation |
Computes geographical distances from geographical coordinates
coord2dist(file=NULL, coordmatrix=NULL, cut=NULL,
file.format="degminsec",
output.dist=FALSE, radius=6378.137,
fp=1/298.257223563, neighbors=FALSE)
file |
string. A filename for the coordinate file. The file
should have 2, 4 or 6 numeric columns and one row for each location.
See |
coordmatrix |
something that can be coerced into a matrix with
2, 4 or 6 columns. Matrix of coordinates, one row for each
location. See |
cut |
numeric. Only active if |
file.format |
one of
|
output.dist |
logical. If |
radius |
numeric. Radius of the earth in km used in computation (the default is the equatorial radius but this is not the uniquely possible choice). |
fp |
flattening of the earth; the default is from WGS-84. |
neighbors |
logical. If |
If neighbors==TRUE
, a
list with components
distmatrix |
distance matrix between locations. See
|
nblist |
list with a vector for every location containing the
numbers of its neighbors, see |
If neighbors==FALSE
, only the distance matrix.
Christian Hennig christian.hennig@unibo.it https://www.unibo.it/sitoweb/christian.hennig/en
German Wikipedia from 29 August 2010: https://de.wikipedia.org/wiki/Orthodrome
geo2neighbor
options(digits=4)
data(veronica)
coord2dist(coordmatrix=veronica.coord[1:20,], cut=20, file.format="decimal2",neighbors=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.