Geographical coordinates to distances
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.
German Wikipedia from 29 August 2010: http://de.wikipedia.org/wiki/Orthodrome
options(digits=4) data(veronica) coord2dist(coordmatrix=veronica.coord[1:20,], cut=20, file.format="decimal2",neighbors=TRUE)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.