GeoDist2Point: Returns vector of Haversine distances

View source: R/Geographic_distance_functions.R

GeoDist2PointR Documentation

Returns vector of Haversine distances

Description

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.

Usage

GeoDist2Point(RefLatLongs, TargetLatLong)

Arguments

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.

Value

The distance in metres between the point of interest (TargetLatLong) to all other points in the reference material (RefLatLongs).

Citations

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

Author(s)

Ardern Hulme-Beaman


ArdernHB/GeoOrigins documentation built on Nov. 19, 2022, 10:21 a.m.