Turn by Turn: Always Turn Right #3289
-
Hi, I wonder if it's possible to set a restriction like "always turn right" or set a penalty for left turns. If possible, is it also possible to apply these restrictions for a specified area (polygon) ? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
it would be pretty straight forward for us to add support for request time modification of turn penalties (we already have hardcoded ones). doing it only inside the polygon is quite advanced and probably prohibatively costly to do it on the fly. instead we'd have to mark all the graph nodes that are inside the polygon upfront (as the first step before we run the route) and then store them in a map to check if the penalty should be applied at any point in the algorithm. its all doable but none of it exists today. if you are interested in working on it i can show you where the changes would be made |
Beta Was this translation helpful? Give feedback.
-
I didn't open a new discussion because the question is similar. Is there a way to avoid u-turns? Also, can we easily implement the left turn penalties? The polygon idea seems more complicated (but would be cool in my opinion), still applying the same penalty for whole route is as easy as adding/changing some multipliers if I understand correctly. Should I open another discussion as a feature request? |
Beta Was this translation helpful? Give feedback.
it would be pretty straight forward for us to add support for request time modification of turn penalties (we already have hardcoded ones).
doing it only inside the polygon is quite advanced and probably prohibatively costly to do it on the fly. instead we'd have to mark all the graph nodes that are inside the polygon upfront (as the first step before we run the route) and then store them in a map to check if the penalty should be applied at any point in the algorithm.
its all doable but none of it exists today. if you are interested in working on it i can show you where the changes would be made