-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with viaroute example #141
Comments
I'll have a look, the error implies that the number of routes doesn't match the summary information which seems rather odd (and I'm sure this example worked when I tried it a few weeks ago). |
Thanks for the fix - no longer errors but I get some strange warnings and the output looks strange:
|
Compared with this from the osrm package: install.packages("osrm")
library(osrm)
r_osrm <- osrmTrip(data.frame(i = 1:3,x=c(150,150.1,150.2),y=c(-33.5,-33.6,-33.7)))
plot(r_osrm[[1]]$trip) |
Also this seems to generate an error with the stplanr implementation: origin = tmap::geocode_OSM("London")
destination = tmap::geocode_OSM("Leeds")
od_df = rbind(origin$coords, destination$coords)
exroutes <- viaroute(viapoints = list(od_df))
r <- viaroute2sldf(exroutes)
Interestingly this also seems to fail with osrm: ro = osrmRoute(origin, destination)
|
Update: it works with osrm: riatelab/osrm#17 |
Reopening, seeing the same thing. I'll have another look. |
Any update on this @richardellison? Thinking better to fix bugs before adding new features and improving performance. |
This has been fixed in #161. The following now returns the correct geometries.
You will notice that this is different from the result returned by the osrm package. This is because the "osrm" package calculates the individual routes between each pair of coordinates while this implementation uses the coordinates as waypoints on a single route. To return the same result as the "osrm" package you can run the following:
|
Correct problems with viaroute2sldf when routes contain multiple legs. Fixes #141
This is what I get when running the viaroute example:
The other example works fine though. Any ideas @richardellison?
The text was updated successfully, but these errors were encountered: