distance_haversine: compute distance in km between two points:...

View source: R/distance_haversine.R

distance_haversineR Documentation

compute distance in km between two points: http://en.wikipedia.org/wiki/Haversine_formula

Description

compute distance in km between two points: http://en.wikipedia.org/wiki/Haversine_formula

Usage

distance_haversine(lat1, lon1, lat2, lon2, r = 6378.137)

Arguments

lat1

latitude of the first geographical location in decimal degrees (WGS84)

lon1

longitude of the first geographical location in decimal degrees (WGS84)

lat2

latitude of the second geographical location in decimal degrees (WGS84)

lon2

longitude of the second geographical location in decimal degrees (WGS84)

r

earth diameter at the equator in km

Value

a numeric value of the distance between the two points in km

Examples

distance_haversine(43.5279, 1.5009, 42.8504, -0.4333)

picasa/agroenv documentation built on Nov. 17, 2022, 3:05 a.m.