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

OSRM does not ignore highway service roads #1386

Closed
xyz32 opened this issue Feb 17, 2015 · 27 comments
Closed

OSRM does not ignore highway service roads #1386

xyz32 opened this issue Feb 17, 2015 · 27 comments

Comments

@xyz32
Copy link

xyz32 commented Feb 17, 2015

The emergency links between highway directions are not ignored by OSRM.
Steps:

  1. Plan a rout that navigate near an emergency link on a highway.
  2. Observe OSRM using the emergency link.

See the route planed here: http://www.openstreetmap.org/directions?engine=osrm_car&route=45.9099%2C-72.4878%3B45.9161%2C-72.4859

or this: http://www.openstreetmap.org/directions?engine=osrm_car&route=45.93830%2C-72.45397%3B45.93841%2C-72.45432#map=19/45.93878/-72.45372

@emiltin
Copy link
Contributor

emiltin commented Feb 17, 2015

the link also has access=no, which should prevent routing

@DennisOSRM
Copy link
Collaborator

Yup, the access tag was added recently. Should be reflected with the next data update or the one after that

@emiltin
Copy link
Contributor

emiltin commented Feb 17, 2015

oh, i thought that access tag had been parsed since a long time?

@DennisOSRM
Copy link
Collaborator

sure, it's just beed added recently to the way in question

@emiltin
Copy link
Contributor

emiltin commented Feb 17, 2015

ah ok

@xyz32
Copy link
Author

xyz32 commented Feb 17, 2015

The access=no has been added yesterday by me to try to figure out what is going on. But the link was set to emergency long time ago and OSRM is still using it.

@DennisOSRM
Copy link
Collaborator

As mentioned before, it takes some time before a change is reflected in the routing. Updates occur roughly twice a day with a 10--14 hour lag. In short, give it some time.

@xyz32
Copy link
Author

xyz32 commented Feb 17, 2015

Looks like this issue has diverted to an tangent issue:

  1. OSRM database not updated (10--14 hour lag) for the access=no tag. FIXED (wait for database sync)
    Original issue:
  2. OSRM uses emergency links for routing. Still OPEN: https://www.openstreetmap.org/directions?engine=osrm_car&route=45.71245%2C-72.77065%3B45.71265%2C-72.77087#map=17/45.71302/-72.77117
    This is an even better example: http://www.openstreetmap.org/directions?engine=osrm_car&route=45.93830%2C-72.45397%3B45.93841%2C-72.45432#map=19/45.93878/-72.45372

OSRM shoul ignore Emergency links, with or without the access flag.

@blinkenlight
Copy link

The issue I'm having with OSRM may not be identical to the one reported above, but it sure can be described with the same exact words - I think any service roads should only be used as a last resort, if nothing else goes there (if you wish, I can open a new issue for this, let me know). The thing is I noticed a disproportionately strong propensity of OSRM to take "shortcuts" through hilariously obscure service roads in a city map when an almost identically long secondary or tertiary main artery connects the same endpoints (see osrm.at/b1i for an example - the obvious route would be osrm.at/b1l); Technically the routing is not incorrect - those alleyways behind the buildings do exist and can be traversed with a car - but no-one in their right mind would choose to go that way (or indeed would be able to without having a nervous breakdown trying to squeeze through - in practice, you only enter those if you live there and want to park your car...). It's obviously not even an actually shorter route (not in any meaningful way at least), and this sort of thing keeps happening with every single route in my experience. Note that the strategy on the page is labelled "car(fastest)", not "walk(shortest, down to mm, ok with getting mugged)" - I think it would be a shame to leave this quirk like that, in an otherwise awesome service... :)

@DennisOSRM
Copy link
Collaborator

Lets try not to conflate issues here. The original point of the issue was that a road that is closed to general traffic is (or was) being used.

What @blinkenlight is asking for is to have a (turn) penalty on leaving an important road and also implicitly to minimize turns.

@DennisOSRM
Copy link
Collaborator

See #1387 for an issue on road preference.

@xyz32
Copy link
Author

xyz32 commented Feb 18, 2015

OK database seems to have updated so:
OSRM using emergency links still open: http://www.openstreetmap.org/directions?engine=osrm_car&route=45.93830%2C-72.45397%3B45.93841%2C-72.45432#map=19/45.93878/-72.45372

OSRM ingnoring links with access=no tag: FIXED (as expected).

@DennisOSRM
Copy link
Collaborator

OSRM ingnoring links with access=no tag: FIXED (as expected).

For future reference, as folks pick up unconnected pieces of info from issues, I'd like to stress that this has not been a a case of handling the access tag incorrectly.

@emiltin
Copy link
Contributor

emiltin commented Feb 18, 2015

i think the original problem was that osrm follows roads with:

highway=service
service=emergency_access

@xyz32
Copy link
Author

xyz32 commented Feb 18, 2015

@emiltin Yes that is the issue, I have also been able to find the wiki page that describe an emergency link: http://wiki.openstreetmap.org/wiki/Proposed_features/emergency_vehicle_access

@DennisOSRM
Copy link
Collaborator

i think the original problem was that osrm follows roads with:

highway=service
service=emergency_access

Right, and then the issue was that having access information in the service but not the access tag is quite inconsistent. Looking at the link from @emiltin the much cleaner tagging would be to disallow access by access=emergency. If we agree on this, it could be added rather quickly.

@xyz32
Copy link
Author

xyz32 commented Feb 18, 2015

The annoying thing now is that the decision about the "access=emergency" tag in the wiki was left sort of open. See the comments at the end of the wiki article.

As for the fix for this issue I would vote OSRM to ignore "access=emergency" roads.

@DennisOSRM
Copy link
Collaborator

Well, decision on the wiki are a cargo cult. 😀

Will add support (or rather unsupport) for access=emergency in a bit.

@DennisOSRM
Copy link
Collaborator

Turns out, this is already implemented for more than a year.

@xyz32
Copy link
Author

xyz32 commented Feb 18, 2015

So, why is the routing using emergency roads?
EDIT: see #733

@DennisOSRM
Copy link
Collaborator

Not using access=emergency tags.

@xyz32
Copy link
Author

xyz32 commented Feb 18, 2015

yes sorry I just seen the discussion on #733. I will update the map to respect that then. Thank you.

@joostschouppe
Copy link

I couldn't find a more general discussion on highway=service without extra tags. Shouldn't they be considered as at least as restrictive as access=destination? Or is it really a choice to allow them for standard routing?

@danpat
Copy link
Member

danpat commented Apr 6, 2017

Handling here is slowly improving:

https://github.com/Project-OSRM/osrm-backend/blob/master/profiles/car.lua#L136-L143

we now penalize access to some service road types (but not all).

The medium-term goal is to implement a solution for #592 - this would allow the turn function to penalize access to service roads without needing to remove them from the routing network.

We want to keep them in the network so that routes can start and end on them (e.g. if you're requesting a route based on your current position from your phone). Penalizing access will prevent routes through service roads, but won't affect routing from/to, which is the desired behaviour.

@joostschouppe
Copy link

Hmm, I'm not sure that's the best approach. There are huge amounts of service roads without an extra tag. I don't think that's even wrong. BTW, service=parking is rare and not documented. Parking_aisle is also considered wrong for parking entrances.
I would agree that they should be avoided, and should not be removed. As a rule of thumb, I would say they shouldn't be used unless they are the only way to get to your destination (or waypoint). Which I would suppose you already implemented for highways tagged access=destination.

@daniel-j-h
Copy link
Member

daniel-j-h commented Apr 7, 2017

@joostschouppe we penalize turns onto access=destination ways; the same could happen for service roads. Please see this diary post and the following issue from today:

What you'd have to do is in the car profile (profiles/car.lua) penalize turns onto service roads. Then the routing engine will only route you there if there is no other way.

@joostschouppe
Copy link

OK, now I get it. Thanks for taking the time to explain.

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

No branches or pull requests

7 participants