Description Usage Arguments References Examples
The function calculates distances between the two points along great circle using the Vincenty's formulae. This is an iterative method which is based on the assumption that the figure of the Earth is an oblate spheroid, and for that reason is more precise than the Spherical Law of Cosines formulae.
1 2 3 4 5 6 7 8 9 10 11 | vincentyDistance(...)
## Default S3 method:
vincentyDistance(latitude1,
longitude1, latitude2, longitude2, units = "km",
maxIter = 100, convCrite = 1e-12, ...)
## S3 method for class 'Coordinate'
vincentyDistance(coordinate1,
coordinate2, units = "km", maxIter = 100,
convCrite = 1e-12, ...)
|
latitude1 |
the first latitude coordinate |
longitude1 |
the first longitude coordinate |
latitude2 |
the second latitude coordinate |
longitude2 |
the second longitude coordinate |
units |
a string with the distance units (default kilometers) |
coordinate1 |
the first coordinate class variable |
coordinate2 |
the second coordinate class variable |
maxIter |
maximum number of iterations in the calculation |
convCrite |
convergence criteria for the calculation |
... |
other arguments |
http://www.movable-type.co.uk/scripts/latlong-vincenty.html
1 2 3 | cord1 <- Coordinate(43, -8)
cord2 <- Coordinate(42, -7)
distance <- vincentyDistance(cord1, cord2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.