Routing to the nearest viable point #930

Closed
samlown opened this Issue Feb 24, 2014 · 25 comments

Comments

Projects
None yet
10 participants

samlown commented Feb 24, 2014

This is closely related to issue #926.

We're creating routes based on GPS data. Occasionally, the GPS indicates that a start or end location is situated in a place where there is no entry or exit, an island of sorts as described in #926, when the real location is probably on a main road a few meters away.

Is there any way to route between what I would call the "nearest viable point"? In effect, this would mean detecting when a point cannot be routed to and scanning for the nearest point that can be reached.

I believe this is similar to the z parameter, but adapted for when the nearest location cannot be routed to.

Example failing query to the API:

http://router.project-osrm.org/viaroute?loc=40.4221205,-3.707557599999973&loc=40.4576797,-3.692164400000024&z=10

Thanks for any advice!

Owner

DennisOSRM commented Feb 24, 2014

This is already on the roadmap and (IIRC) captured in an earlier issue. Planned to come with the release after next one.

Contributor

emiltin commented Feb 24, 2014

isn't this the same as the current z parameter filtering islands - just taking deadend oneways into account?

Owner

DennisOSRM commented Feb 24, 2014

Not only that, but also somewhat more. The following example illustrates it:

bildschirmfoto 2014-02-24 um 15 35 02

vs

bildschirmfoto 2014-02-24 um 15 37 22

Contributor

emiltin commented Feb 24, 2014

so in effect setting a 'search radius' for A and B, and finding the shortest path possible?

samlown commented Feb 24, 2014

Thanks @DennisOSRM ! Yes, your image looks like it could be solved in the same way and would also help us for other similar situations.

Contributor

emiltin commented Feb 24, 2014

The feature was discussed in #204 - also the option to pass a direction/velocity hint, which is used to pick the start way.

Owner

DennisOSRM commented Feb 24, 2014

Thanks @emiltin for digging this up

Contributor

emiltin commented Feb 24, 2014

use compass bearing when selecting start way #605

samlown commented Apr 8, 2014

@DennisOSRM We've run into a few more situations where this would be very useful for our platform. Is there any way to sponsor the development of a rapid solution for this? We don't have enough knowledge about OSRM in-house to solve such a complex issue, but would be willing to sub-contract.

Contributor

emiltin commented Apr 8, 2014

btw, there are already cucumber tests related to this in the repo. see the file features/testbot/bearing_param.feature

@DennisOSRM Is there any change regarding this issue in latest v0.4.1? I'm asking because you included this issue on distance matrix "battle plan" and I think I saw a commit related with 180° flip bearing or so... :-)

Owner

DennisOSRM commented May 23, 2014

This is on the list for 0.4.2

@DennisOSRM... This one didn't come with 0.4.2, right?
I've tried tracking this one down through the commits but I didn't make it! :-)

Thanks!

mck- commented Aug 23, 2014

The example API call in the original issue seems to work, but I've encountered one that didn't:

https://router.project-osrm.org/viaroute?z=8&loc=22.2799907,114.1587983&loc=22.2814434,114.158639

image

image

Owner

DennisOSRM commented Aug 23, 2014

Thx for providing a new example @mck-

Contributor

systemed commented Nov 17, 2014

Another example I've just encountered: 33.86486,-84.47322 is on a private road. The nearest point on the network (as returned by /nearest) is 33.864792,-84.47303, which is at the end of a short one-way stretch and therefore unroutable.

Owner

DennisOSRM commented Nov 18, 2014

At times it can also be data issues, e.g.:

bildschirmfoto 2014-11-18 um 09 05 09

Here it is a mandatory right turn that makes going straight impossible.

Contributor

systemed commented Nov 19, 2014

Yep.

The issue I've encountered several times now is where you have a short 'divided highway' access to a private estate:

screen shot 2014-11-19 at 17 32 01

The default car profile won't route onto the private road, so looks for the nearest segment, which happens to be a one-way "dead end" in the divided highway.

Owner

DennisOSRM commented Jan 6, 2015

This is implemented now and will be part of the upcoming release.

TheMarex closed this Feb 3, 2015

Contributor

emiltin commented Apr 20, 2015

there is a barrier=cycle_barrier at https://www.openstreetmap.org/node/3341832207

Contributor

emiltin commented Apr 20, 2015

also it has no highway=*

Is there some kind of radius variable that I could tweak?

I'm still seeing problems. Not getting a viable point for viaroute.
I start with a coordinate in the middle of a mountain (the other end of the route is an OK road point). I use /nearest to get to the nearest road segment: http://localhost:5000/nearest?loc=37.6756461497,-119.467181647
However, this mountain road segment is closed in winter so I am still receiving "impossible route" from viaroute when I swap in this nearest point.
To provide a true viable route, nearest would have to provide the first open road segment down the mountain.

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