Learn R Programming

geosphere (version 1.3-13)

midPoint: Mid-point

Description

Find the point half-way between two points along a great circle

Usage

midPoint(p1, p2)

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

Value

  • A pair of coordinates (longitude/latitude)

References

http://mathforum.org/library/drmath/view/51822.html http://en.wikipedia.org/wiki/Great_circle_distance http://www.movable-type.co.uk/scripts/latlong.html

Examples

Run this code
midPoint(c(0,0),c(90,90))

Run the code above in your browser using DataLab