geoDist: Geodetic distances from latitude and longitude

Description Usage Arguments Details Value References See Also

Description

Given two sets of points on the earth's surface in latitude, longitude form, returns the geodetic distances in meters between corresponding points.

Usage

1
geoDist(lat1, lon1, lat2, lon2, NAOK = TRUE, DUP = TRUE)

Arguments

lat1, lon1, lat2, lon2

Latitude and longitude co-ordinates for the two sets of points.

NAOK

Are NA values allowed in the co-ordinates? Default TRUE. If so, corresponding elements of the distance will also be NA.

DUP

Value for the DUP argument to .Fortran().

Details

Uses a classic Fortran algorithm implementing a method that allows for the non-spherical shape of the earth. See comments in the Fortran code for the history of the implementation.

Value

numeric vector of distances, optionally including NA values if those are allowed and present in any of the coordinates.

References

Vincenty,T. (1975). Direct and inverse solutions of geodesics on the ellipsoid with application of nested equations. Survey Review, vol. 23(176):88-94.

See Also

For the DUP argument, see .Fortran.


SoDA documentation built on Oct. 28, 2020, 9:07 a.m.