greatCircleBearing: Great circle

Description Usage Arguments Value Author(s) References Examples

View source: R/greatCircleBearing.R

Description

Get points on a great circle as defined by a point and an initial bearing

Usage

1
greatCircleBearing(p, brng, n=360) 

Arguments

p

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

brng

bearing

n

The requested number of points on the great circle

Value

A matrix of points, or a list of matrices (e.g., if multiple bearings are supplied)

Author(s)

Robert Hijmans based on formulae by Ed Williams

References

http://www.edwilliams.org/avform.htm#Int

Examples

1
greatCircleBearing(c(5,52), 45, n=12)

Example output

       lon        lat
 [1,] -150 -61.540352
 [2,] -120 -64.123486
 [3,]  -90 -59.911287
 [4,]  -60 -42.853083
 [5,]  -30   6.785951
 [6,]    0  48.588948
 [7,]   30  61.540352
 [8,]   60  64.123486
 [9,]   90  59.911287
[10,]  120  42.853083
[11,]  150  -6.785951
[12,]  180 -48.588948

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