-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Comments
The coordinate is always snapped to the closest way, which you can observe by moving the marker to the left slightly. If you start on the other lane, U-turns are actually illegal. The real problem is the combination of geocoder + two-lane street. |
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? |
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. |
What do you mean " add both sides of the roads to the origin?" . Im using it with distance matrix... |
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. |
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. |
Good idea. @DennisOSRM. If the application is just to find a not weird route for web page, queue initialization would be enough. |
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. |
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 |
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¢er=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?
The text was updated successfully, but these errors were encountered: