Skip to content
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

osrmIsochrone(): 'loc' is too far from the OSRM network but loc is not too far... #119

Closed
rCarto opened this issue Nov 29, 2022 · 9 comments

Comments

@rCarto
Copy link
Member

rCarto commented Nov 29, 2022

See:

library(osrm)
#> Data: (c) OpenStreetMap contributors, ODbL 1.0 - http://www.openstreetmap.org/copyright
#> Routing: OSRM - http://project-osrm.org/
iso <- osrmIsochrone(loc = c(-5.02,7.69), breaks = c(0, 5, 10))
#> Warning: An empty object is returned. 'loc' is too far from the OSRM network.

Created on 2022-11-29 with reprex v2.0.2

@gmachin11
Copy link

Hi!

I'm having the same issue, also i noticed that only happens when you add a negative coordinate to the loc requirement, if you type positive positive coordinates it works.

@rCarto
Copy link
Member Author

rCarto commented Nov 30, 2022

@gmachin11 Thanks for the hint!

@gmachin11
Copy link

You're welcome, i tried for each combination of positive and negative, only worked for the positive positive one, like in here:

osrmIsochrone(loc = c(13.43,52.47), breaks = seq(0,12,2))

@rCarto
Copy link
Member Author

rCarto commented Dec 1, 2022

I think that this problem comes from the demo servers (http://router.project-osrm.org/r & https://routing.openstreetmap.de/). It seems that they do not manage the point encoding in google polyline format very well.
I've tried the latest version of OSRM (v.5.27.1) with docker and it is working as expected.
The first priority of osrm package is to be up to date with the OSRM server latest version. So the package is ok in principle & this is not a bug 😄 .

Solutions:

  1. Users affected by this problem could reach to OSRM demo server maintainers and see if an update of the OSRM version is possible from their side. According to their doc the routing.openstreetmap.de demo server uses v5.23.0 (released in Oct. 2020).
  2. I want users to be able to test the package with demo servers before deciding to use their own instance, so I'll try to circumvent the problem within the package and release an update soon.

@rCarto rCarto closed this as completed in c4e8d9f Dec 1, 2022
@rCarto
Copy link
Member Author

rCarto commented Dec 1, 2022

Should be fixed in the dev version of the package.

remotes::install_github('riatelab/osrm')

@ClaudeGrasland
Copy link

Yes ! 👍
I have reinstalled the dev version and now it works.

In fact I had inverted the coordinates of latitude and longitude in my first example and it was the reason why it did not work (the point was in the middle of the sea). 😞

@ACouillet
Copy link

Good morning,
using R osrmIsochrone, I've got the same error : 'loc' is too far from the OSRM network.
No negative value in coordinates and dev version installed from Riate.
It seems like if sf points located at the ends of the roads couldn't be taken into account for isochrones calculation.
image

@rCarto
Copy link
Member Author

rCarto commented May 9, 2023

@ACouillet
Thanks for the feedback, can you give me the coordinates of the point you're trying to get isochrones from ?

@ACouillet
Copy link

@rCarto
Merci Timothéé !
geometry (x / y, WGS84)
6.164979 / 44.11091

In fact, I deduced that among the 15000 points to be treated, some are connected to the network but on portions defined in OSM as roads not accessible to cars so logically the "car" isochrones cannot be calculated...

Also, in some cases, it seems that portions of the network are poorly defined (after verification with IGN data, they should accept an iso calculation which is still impossible).

It is therefore more a problem of characterization of the network in OSM than a malfunction of the program !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants