antipode: Antipodes

Description Usage Arguments Value Author(s) References Examples

View source: R/antipodal.R

Description

Compute an antipode, or check whether two points are antipodes. Antipodes are places on Earth that are diametrically opposite to one another; and could be connected by a straight line through the centre of the Earth.

Antipodal points are connected by an infinite number of great circles (e.g. the meridians connecting the poles), and can therefore not be used in some great circle based computations.

Usage

1
2
antipode(p)
antipodal(p1, p2, tol=1e-9)

Arguments

p

Longitude/latitude of a single point, in degrees; can be a vector of two numbers, a matrix of 2 columns (first one is longitude, second is latitude) or a SpatialPoints* object

p1

as above

p2

as above

tol

tolerance for equality

Value

antipodal points or a logical value (TRUE if antipodal)

Author(s)

Robert Hijmans

References

http://en.wikipedia.org/wiki/Antipodes

Examples

1
2
antipode(rbind(c(5,52), c(-120,37), c(-60,0), c(0,70)))
antipodal(c(0,0), c(180,0))

Example output

     [,1] [,2]
[1,] -175  -52
[2,]   60  -37
[3,]  120    0
[4,] -180  -70
[1] TRUE

geosphere documentation built on May 2, 2019, 5:16 p.m.