Skip to Content

gcIntermediate {geosphere}

Intermediate points on a great circle
Package: 
geosphere
Version: 
1.3-8

Description

Get intermediate points on a great circle inbetween the two points used to define the great circle.

Usage

gcIntermediate(p1, p2, n=50, breakAtDateLine=FALSE, addStartEnd=FALSE, sp=FALSE, sepNA)

Arguments

p1
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
p2
As above
n
The requested number of points on the Great Circle
breakAtDateLine
Logical. Return two matrices if the dateline is crossed?
addStartEnd
Logical. Add p1 and p2 to the result?
sp
Logical. Return a SpatialLines object?
sepNA
Logical. Rather than as a list, return the values as a two column matrix with lines seperated by a row of NA values? (for use in 'plot')

Values

matrix or list

Examples

gcIntermediate(c(5,52), c(-120,37), n=6, addStartEnd=TRUE)

Author(s)

Robert Hijmans based on code by Ed Williams

Documentation reproduced from package geosphere, version 1.3-8. License: GPL (>= 3)