We are using OSM files generated outside of the OSM project, which unfortunately contain some turn restrictions that can be bypassed due to missing internal intersection restrictions. This can result in routes that loop back to reuse the same way, creating suboptimal or unintended routing paths. Here is a simplified example to illustrate the issue:
For example
d f
| |
a---b---c---d
| |
g---h---k---m
| |
n p
Restriction: n-h-b-c-d
Route output: n-h-b-c-k-h-b-c-d
While the best-case solution would be to fix these map issues directly, this isn’t feasible in all cases. As an interim solution, it would be helpful to restrict the routing engine from using the same way twice within a single route to prevent these loops.
Is there a way to implement this restriction without forking OSRM? If not, any guidance on how to approach this customization would be greatly appreciated.