Disabling u-turns

I am using GitHub - geofabrik/OpenRailRouting: routing on railway tracks using OpenStreetMap data and the GraphHopper routing engine for routing for rails. Is there a way to disable u-turns? There are routes returned sometimes that are impossible in real life.

I’m not familiar with OpenRailRouting but in GraphHopper they are already disabled by default.

1 Like

Where is it disabled? Which file / flags are responsible for it? OpenRailRouting is an extension of GraphHopper.

This probably depends on the GraphHopper version. I don’t know which one OpenRailRouting uses. In recent versions the u-turn costs are ultimately determined by the TurnCostProvider given to the Weighting. For profiles in config.yml they will be infinite unless something like u-turn-costs: 50 is specified.

1 Like