Split route based on the id or coordinates of one of its vertices
Source:R/node-funs.R
route_split_id.Rd
Split route based on the id or coordinates of one of its vertices
Examples
sample_routes <- routes_fast_sf[2:6, 3]
r <- sample_routes[2, ]
id <- round(n_vertices(r) / 2)
r_split <- route_split_id(r, id = id)
plot(r$geometry, lwd = 9, col = "grey")
plot(r_split, col = c("red", "blue"), add = TRUE)