Takes lines and removes the start and end point, to a distance determined by the user. Uses the geosphere::distHaversine function and requires coordinates in WGS84 (lng/lat).
toptailgs(l, toptail_dist, tail_dist = NULL)
A SpatialLines object
The distance (in metres) to top the line by. Can be either a single value or a vector of the same length as the SpatialLines object. If tail_dist is missing, is used as the tail distance.
The distance (in metres) to tail the line by. Can be either a single value or a vector of the same length as the SpatialLines object.