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

Point on the opposite site of 2-lane road #1389

Closed
huberttt opened this issue Feb 19, 2015 · 9 comments
Closed

Point on the opposite site of 2-lane road #1389

huberttt opened this issue Feb 19, 2015 · 9 comments

Comments

@huberttt
Copy link

I think when it picks a point which is placed on the opposite side of road it gives me some strange detours, sometimes it goes in wrong direction till it's possible to turn back. Here's an example : http://map.project-osrm.org/?hl=pl&loc=49.839077,22.798569&loc=49.894890,22.816528&z=12&center=49.855915,22.748566&alt=0&df=0&re=0&ly=763558683
Instead going straight ahaed from A to B it leads to closest U turn and then gives a proper direction. Caused by point on the opposite side of reoad but how can I omit this issue?

@TheMarex
Copy link
Member

The coordinate is always snapped to the closest way, which you can observe by moving the marker to the left slightly.

http://map.project-osrm.org/?hl=pl&loc=49.839054,22.798666&loc=49.894890,22.816528&z=18&center=49.840006,22.799308&alt=0&df=0&re=0&ly=763558683

If you start on the other lane, U-turns are actually illegal.

The real problem is the combination of geocoder + two-lane street.

@huberttt
Copy link
Author

I have already managed to observe that. What bothers me is I got my point from GPS positioner, so with limited accuracy, which I personally have no influence. Hence my question, what can I do with that ? Or have anyone met with this problem?

@zhiqiangZHAO
Copy link

if this is used in a real navigation app, the problem is quite common. The user should just drive, and a deviation will be triggered. If you just want to make it a little beautiful, you need to change logic to find the origins, for example, add the both sides of the roads to the origin, then the least cost road will be returned.

@huberttt
Copy link
Author

What do you mean " add both sides of the roads to the origin?" . Im using it with distance matrix...

@zhiqiangZHAO
Copy link

assume you have a virtual origin, which connect to both side of the roads, and the cost for the virtual origin to the 2 real origin are both 0. Then your route result is the least cost from either one.

@DennisOSRM
Copy link
Collaborator

Right. Queue initialization can fix things. Ideally, one would not initialize with zero but use a value that models the distribution/noise from the GPS signal. That (among a number of other things) would avoid a number of odd edge cases.

@zhiqiangZHAO
Copy link

Good idea. @DennisOSRM. If the application is just to find a not weird route for web page, queue initialization would be enough.

@DennisOSRM
Copy link
Collaborator

Yes and no. You will have to come up with a similar model. Otherwise I will be impossible to explicitly start on the 'wrong' side of the street.

@MoKob
Copy link

MoKob commented Jun 17, 2016

The demoserver itself doesn't do so, but you can use our bearing parameter by now.

See https://github.com/Project-OSRM/osrm-backend/blob/master/docs/http.md under General options

@MoKob MoKob closed this as completed Jun 17, 2016
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

5 participants