ropensci / stplanr

Sustainable transport planning with R
https://docs.ropensci.org/stplanr
Other
417 stars 66 forks source link

Incorrect bbox returned by route() due to use of data.table #452

Closed Robinlovelace closed 3 years ago

Robinlovelace commented 3 years ago

Reproducible example:

> library(stplanr)
> l = flowlines_sf[2:9, ]
> library(sf)
> l = flowlines_sf[2:9, ]
> r = route(l = l, route_fun = route_osrm)
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=03s  
Most common output is sf
> sf::st_bbox(l)
     xmin      ymin      xmax      ymax 
-1.550807 53.804098 -1.511861 53.828874 
> sf::st_bbox(r)
     xmin      ymin      xmax      ymax 
-1.535611 53.828571 -1.516748 53.829768 
> sfheaders::sf_bbox(r$geometry)
     xmin      ymin      xmax      ymax 
-1.552759 53.803765 -1.511701 53.832320