data("routes_fast")
sp::proj4string(routes_fast) <- CRS("+init=epsg:4326")
r_toptail <- toptail(routes_fast, toptail_dist = 300)
plot(routes_fast, lwd = 3)
plot(r_toptail, col = "red", add = TRUE)
plot(cents, col = "blue", add = TRUE, pch = 15)
# Note the behaviour when the buffer size removes lines
r_toptail <- toptail(routes_fast, toptail_dist = 1000)
length(r_toptail) # note short routes have been removed
length(routes_fast)
plot(routes_fast, lwd = 3)
plot(r_toptail, col = "red", add = TRUE)
Run the code above in your browser using DataLab