Edge base VS Node Base


I was checking the difference between import graph with or without turn costs. Obviously turn cost must be edge based. What I don’t understand is why do I have nodes file bigger with turn costs but edges file with the exactly the same size. Is the file turn_cost virtual edges?

Thank you in advance for your answer.

The nodes file is bigger in size? By how much? I would expect both the nodes and edges file to be the same size (regardless of turn_costs or not). GraphHopper uses the same (node-based) graph for routing with and without turn costs, but instead uses edge-based graph traversal / routing algorithms. The turn_costs file stores the turn costs, i.e. edge-node-edge-cost tuples (one for each turn relation found in the OSM file).

Hi easbar,

Probably I was using different pbf files to generate graph. My mistake. Using the same I have the exactly same nodes and edges on both no ch and ch graph.

Thank you for your answer.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.