interp_equal | R Documentation |
Calculate great circle intermediate points on longitude, latitude input vectors. A spherical model is used, from the geosphere package.
interp_equal(x, distance = NULL, duration = NULL)
x |
trip object |
distance |
optional minimum distance (metres) between interpolated points |
duration |
optional minimum duration (seconds) between interpolated points |
For the result to be sensible, the input must either be in longitude/latitude, or be in a projection and have a valid CRS. Great circle movement is assumed, there's no way to use this to interpolate equal-distance in the native projection.
If no input distance
or duration
is provided a default is used of 15 points between each input point.
if both distance
AND duration
is provided, distance
is ignored.
Note, the original implementation of this function was called 'interpequal()', and was used for time spent calculations. The functionality is now provided by the traipse package.
S4 trip object with interpolated new locations based on distance or duration parameters
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.