Skip to content

Only have global uturns parameter #2012

@freenerd

Description

@freenerd

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)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions