View source: R/Geographic_distance_functions.R
GeoDist2Point | R Documentation |
This function uses the geosphere
package function distHaversine
to calculate multiple distances between a set of Latitude Longitude coordinates to a target Latitude Longitude coordinate.
GeoDist2Point(RefLatLongs, TargetLatLong)
RefLatLongs |
a matrix of n rows by 2 columns where n is the number of coordinates and the columns are Latitude and Longitude values in that order. |
TargetLatLong |
a vector of 2 elements that are Latitude and Longitude values in that order. This is the coordinate of interest which all distances will be calculated to. |
The distance in metres between the point of interest (TargetLatLong) to all other points in the reference material (RefLatLongs).
Sinnott, R.W, 1984. Virtues of the Haversine. Sky and Telescope 68(2): 159
Robert J. Hijmans (2017). geosphere: Spherical Trigonometry. R package version 1.5-7. https://CRAN.R-project.org/package=geosphere
Ardern Hulme-Beaman
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.