# NOT RUN {
l <- flowlines[2:5, ]
r <- line2route(l)
rf <- line2route(l = l, "route_cyclestreet", plan = "fastest")
rq <- line2route(l = l, plan = "quietest", silent = TRUE)
plot(r)
plot(rf, col = "red", add = TRUE)
plot(rq, col = "green", add = TRUE)
plot(l, add = T)
line2route(flowlines_sf[2:3, ], route_osrm)
# Plot for a single line to compare 'fastest' and 'quietest' route
n <- 2
plot(l[n, ])
lines(rf[n, ], col = "red")
lines(rq[n, ], col = "green")
# Example with list output
l <- l[1:3, ]
rf_list <- line2route(l = l, list_output = TRUE)
line2route(l[1, ], route_graphhopper)
# }
Run the code above in your browser using DataLab