lonlat_to_bearing: Calculate great circle distance and bearing between...

View source: R/utils.R

lonlat_to_bearingR Documentation

Calculate great circle distance and bearing between coordinates

Description

Calculate great circle distance and bearing between spatial coordinates, defined by longitude and latitude of both origin and destination points.

Usage

lonlat_to_bearing(origin_lon, origin_lat, dest_lon, dest_lat)

Arguments

origin_lon, origin_lat

the origin longitude and latitude.

dest_lon, dest_lat

the destination longitude and latitude

Examples

# one degree longitude should equal approximately 111km at the equator
lonlat_to_bearing(0, 0, 1, 0)

mrc-ide/genescaper documentation built on May 25, 2022, 10:46 p.m.