bcgov / ols-router

BC Advanced Route Planner
https://bcgov.github.io/ols-router/
Apache License 2.0
23 stars 11 forks source link

Add support for a user preference to avoid U-turns when visiting points on streets that don't lead to dead-ends #325

Open mraross opened 2 years ago

mraross commented 2 years ago

When visiting a stop on streets that don't lead to dead-ends, users would prefer a route that continues on in the same direction rather than having to execute a U-Turn. This preference could be a boolean flag called avoidUTurns.

This requirement was raised by the Height Clearance Tool application group at the Ministry of Transportation and Infrastructure. It could turn into an OnRoute requirement as well.

mraross commented 2 years ago

We already keep a dead-end flag on each road segment that indicates the segment leads to a dead-end directly or indirectly (on an adjacent segment). The screenshot below shows road segments leading to dead-end in dashed lines. It was created by turning on the dead-end layer.

image

To visit point 1 on Helen Rd from Helmcken Rd, you have to do a U-Turn to get out again. To visit a point that isn't on a road segment leading to a dead-end, the router can avoid a U-Turn.

image