Project-OSRM / osrm-backend

Open Source Routing Machine - C++ backend
http://map.project-osrm.org
BSD 2-Clause "Simplified" License
6.31k stars 3.33k forks source link

arrival and departure directions #6197

Closed RegularnaMatrica closed 2 years ago

RegularnaMatrica commented 2 years ago

Is it possible to specify both arrival and departure direction for points (every point except start and end is intersection) in route service?

Use case of this is to choose angle of turns.

danpat commented 2 years ago

Yes, see the bearings= paramater in the documentation.

RegularnaMatrica commented 2 years ago

Yes, see the bearings= paramater in the documentation.

Thank you for answer. I'am aware of bearings parametar. Using it I was only able to put restriction on arrival or departure direction for each point and not both. Is it possible to simultaneously put arrival and departure condition for 1 point?

Example:

for intersection (-83.05325, 42.48991) I know there are 3 ways with bearings = 120, 135 and 300.

image

  1. How to make route query to enter this intersection from direction with bearing 120 and leave at bearing 300?
  2. Is it possible to find these 2 black points? image

I've tried using bearing argument but I've got strange results. For upper black point (120 bearing) I've tries something like: http://localhost:5000/nearest/v1/driving/-83.05325,42.48991?number=8&bearings=300,175 with different value for number but I don't quite understand connection of results with argument bearings