Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

midPoint

Mid-point


Description

Find the point half-way between two points along an ellipsoid

Usage

midPoint(p1, p2, a=6378137, f = 1/298.257223563)

Arguments

p1

longitude/latitude of point(s). Can be a vector of two numbers, a matrix of 2 columns (first one is longitude, second is latitude) or a SpatialPoints* object

p2

As above

a

major (equatorial) radius of the ellipsoid

f

ellipsoid flattening. The default value is for WGS84

Value

matrix with coordinate pairs

Author(s)

Elias Pipping and Robert Hijmans

Examples

midPoint(c(0,0),c(90,90))  
midPoint(c(0,0),c(90,90), f=0)

geosphere

Spherical Trigonometry

v1.5-10
GPL (>= 3)
Authors
Robert J. Hijmans [cre, aut], Ed Williams [ctb], Chris Vennes [ctb]
Initial release
2019-05-25

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.