Clip the first and last n metres of SpatialLines
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)
| l | A SpatialLines object | 
| toptail_dist | 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. | 
| tail_dist | 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. | 
Other lines: 
angle_diff(),
geo_toptail(),
is_linepoint(),
line2df(),
line2points(),
line_bearing(),
line_breakup(),
line_match(),
line_midpoint(),
line_sample(),
line_segment(),
line_via(),
mats2line(),
n_sample_length(),
n_vertices(),
onewaygeo(),
points2line(),
toptail_buff(),
update_line_geometry()
data("routes_fast")
rf <- routes_fast[2:3, ]
r_toptail <- toptailgs(rf, toptail_dist = 300)
plot(rf, lwd = 3)
plot(r_toptail, col = "red", add = TRUE)
plot(cents, add = TRUE)Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.