geosphere (version 1.2-15)

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)

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?

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 DataCamp Workspace