Learn R Programming

geosphere (version 1.3-13)

gcIntermediate: Intermediate points on a great circle

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')

Value

  • matrix or list

References

http://williams.best.vwh.net/avform.htm#Intermediate

Examples

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

Run the code above in your browser using DataLab