diff --git a/12-transport.Rmd b/12-transport.Rmd index 30e9edde2..8b8877a01 100644 --- a/12-transport.Rmd +++ b/12-transport.Rmd @@ -355,7 +355,11 @@ desire_carshort = dplyr::filter(desire_lines, car_driver > 300 & distance < 5000 ``` ```{r 12-transport-18, eval=FALSE} -route_carshort = line2route(desire_carshort, route_fun = route_osrm) +route_carshort = route( + l = desire_carshort, + route_fun = osrm::osrmRoute, + point_input = TRUE + ) ``` `st_length()` determines the length of a linestring, and falls into the distance relations category (see also Section \@ref(distance-relations)).