Hello,
I am new to ORS so maybe I am missing a point.
I would like to get the cost of traveling from A to B in terms of distance and duration. The Python code I’m using looks like this:
Yeah, I did, because you didn’t supply the same coordinate for both sites. If you do use the exact same, you get the same results.
With ORS there’s unfortunately no way to give hints on which street you prefer, it just snaps to the closest one. The only way around it is to provide accurate coordinates. There’s a few more options like radius which constricts the radius with which it snaps coordinates, but just try around a little with the options: https://openrouteservice.org/dev/#/api-docs/v2/directions/{profile}/geojson/post
I supplied the same coordinates on both sites. I used copy paste so no way they are different. However, as you said, each service snaps the coordinates differently. OSM snapped it to the street on the right but OSR on the left. I will try with the available suggested options.
Click again on both links you posted. The starting point is not the same in both links. In ORS the starting is in the center of the building, with OSM it’s in the middle of the actual road you want.
I understood you. But I supplied the same coordinates in the both services. OSM automatically snaps the coords to the middle of the road. OSR doesn’t. Try to copy paste the coordinates I have written in my question in both services and you see what I mean.
Here is another example with coords directly on the road (so the don’t have to be snapped). The suggested way for the car is alright. However, the one for the pedestrian is totally unrelaible.
@andrzej@HendrikLeuschner, is there some hard-coded preference for side streets in pedestrian? It really feels ridiculous a little that it always sends you the much longer way on side streets. That’s what the quiet preference should be for (if it was working…).
From what I remember, we had to make it so that main roads with no sidewalk tags were marked as lower preference due to complaints from other users where the routes for pedestrians were going down main roads that were not suitable at all
Indeed, both cycling and walking profiles prioritize certain streets based on road class and OSM way tags. It works only as good as the underlying OSM data. As @adam pointed out, typically you wouldn’t want to send people down a busy street if there is a safer alternative.