I just started using the Graphhopper Core Java library. I am trying to create a graph using individual route segments from my database and finding the best possible routes between two points. Hereby I am focussing on train transport. I used this documentation for creating and querying my graph:
Now because I am routing for trains, I want to avoid impossible routes such as this example:
I think I can accomplish this using a TurnWeighting, is this a right assumption? If so, how do I initialize such Weighting, do I need to iterate over all junctions and assign a TurnInfo for all edges that start or end in that node?
I realize that there is a possibility that I am making it to hard, or looking in the wrong direction. Any guidance will be appreciated.