intermediate: Intermediate points on a great circle (sphere)
Description
Get intermediate points (way points) between the two locations with longitude/latitude coordinates. gcIntermediate is based on a spherical model of the earth and internally uses distCosine.
longitude/latitude of a single point, in degrees. This can be a vector of two numbers, a matrix of 2 columns (first one is longitude, second is latitude) or a spatial points object from terra (SpatVector) of sf
p2
as for p1
n
integer. The desired number of intermediate points
breakAtDateLine
logical. Return two matrices if the dateline is crossed?
addStartEnd
logical. Add p1 and p2 to the result?
output
character. One of "list", "matrix", "sv" (SpatVector), "sf" or "sp". If NULL, the output is as in previous versions of this package for backwards compatibility
sepNA
logical. Separate matrix values for different points by a row of NA values? (e.g., for use in 'plot')
sp
logical. Depracated. Return a SpatialLines object?
Author
Robert Hijmans based on code by Ed Williams (great circle)