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

Only have global uturns parameter #2012

Closed
2 tasks
freenerd opened this issue Feb 24, 2016 · 3 comments
Closed
2 tasks

Only have global uturns parameter #2012

freenerd opened this issue Feb 24, 2016 · 3 comments
Assignees
Milestone

Comments

@freenerd
Copy link
Member

Currently the viapoint API supports enabling or disabling turns on coordinates. In #519 (comment) the question of how these concretely work came up.

Previous uturn work:

My current understanding:

  • U turns are 180 degree turns of the vehicle on the same way
  • U turns over separated ways are always allowed
  • U turns in dead-end ways are always allowed
  • U turns on ways that are not dead-ends are never allowed
  • U turns for the start coordinate are always allowed (since you may
  • U turns for the start coordinate with bearings
  • U turns do not matter for the last coordinate, since a vehicle only has to reach it regardless from direction
  • U turns can be enabled/disabled for intermediate coordinates for cases where the arrival bearing is 180 degrees different from the departure bearing

Example with U Turn for the intermediate coordinate enabled

c261c2be-0c3b-11e4-99d5-1a63e854d66d

Use cases

  1. Vehicle Type
    • Bikes/Pedestrians can uturn easily everywhere, cars/trucks can't
    • Should be solved via Lua profile, which are vehicle dependent
  2. Local Law
    • U-Turn laws seem to be very different per locality (and even street) per
    • Should be solvable in Lua profile based on tags in OSM? Potentially even a mapping between locality and laws?
  3. User Preference (from org running OSRM)
    • Should be a global Lua parameter to set default to false/true
  4. User Preference (from user requesting OSRM)
    • Needs to be solved via request parameter as is right now

Looking at the use cases, 4. is currently solved, which transitively also solved the other cases but delegates this to the user. 1. and 3. could be solved by being able to set the default in the Lua profile. 2 is a tough nut to crack.

Next actions

  • Expose this API/Library documentation better. Should this be a whole new section?
  • Allow a Lua parameter to globally set uturn default

Way out there

  • Think allowing uturns on segments Allow U-turns #729 (or rather not think about it just now)
@freenerd freenerd added this to the 5.0 milestone Feb 24, 2016
This was referenced Feb 24, 2016
@kostomarovvv
Copy link

Should be solvable in Lua profile based on tags in OSM?

It would be useful to determine (in the profile) permission to uturn for the road.
For example, in "way_function" user can analyze some OSM tags for intermediate via-points, e.g.:

  • lanes=*
  • turn:lanes=*
  • turn:lanes:forward=*
  • turn:lanes:backward=*

etc. and set true or false to "result.uturn" (just for example)

It will prevent to create dispensable "uturn_flag" field in user reference table of locations.

@TheMarex
Copy link
Member

TheMarex commented Mar 9, 2016

We are going to bail on per-via uturn options. After some discussion, we decided to go with a global query-time option and the default should be by profile.

@TheMarex TheMarex changed the title Understanding uturns Only have global uturns parameter Mar 18, 2016
@TheMarex TheMarex self-assigned this Mar 18, 2016
@TheMarex
Copy link
Member

This landed. Default can be set by the profile using properties.uturn_at_via = true.

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

No branches or pull requests

3 participants