Skip to content

Preventing snapping to very small components #7460

@jcoupey

Description

@jcoupey

I have a question related to the snapping behavior encountered in the following situation: a one-way street leads to a highway that is flagged for construction so is (rightly) ignored for routing. The default behavior as shown below when using two locations that are snapped to the one-way "Rue Carnot" is to route withing that small component (see current debug view). This result in a route found or NoRoute depending on the start/end ordering:

Right order, route found

Image

Wrong order, NoRoute

Image

Now I definitely understand that if only one location snaps to that small component, then OSRM will reach to another (non-small) component for connectivity:

Image

Of course one could argue that a one-way dead-end is a data problem. However in that situation, we probably should not expect a contributor marking one road as construction to also bother removing one-ways to adjacent streets just for routing purposes. In order to have a more robust behavior with regard to this kind of situation, I'd like to avoid the NoRoute scenario by avoiding snapping to this very small component.

Is there a way to make sure very small components are discarded altogether for snapping?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions