I was dealing with other issues first, coming back to this rather old post:
If I switch to hybrid mode I have to accept that the Euope/Asia/Africa network gets disconnected correct? Or is it “solvable” by more RAM (if yes, what would that mean for a world graph) ?
Yes. And yes, this would be solveable via more RAM. Instead of 6-10GB per profile you’ll have to plan for at least 2x of the original size IMO and also the speed could be slower (or you would have to further increase RAM usage). To save a bit RAM we can implement this optimization.
Thanks, that helps to get an Idea. So if the base graph is around 20GB that would be an additional 40GB per profile or more.
I tried to understand the current turn cost implementation. So far I found:
Here I can store turn costs between two edges - it looks like this implementation is made for for sparse turn restrictions? Less efficient for turn restrictions for all edges and all tower nodes, Needed space is roughly 10GB for a full graph 4-byte * 4 ints * 3 edges per tower node * number of nodes?
I would estimate that the tower node cardinality is on average “somewhere between 3 and 4”. For a regular 4-way intersection we have to save 8 turn cost entries, so the size of the TurnCost table would be:
Thanks for the update @jankomoot and thanks for the ping.
Yes probably the cardinality is somewhere between 3-4 for tracks, paths, etc. I would assume it might be a bit lower for regular streets, as we see a lot of cuts for different road rules (max speed change, etc.), but I think this is not common for tracks and paths.
fyi: we now have a useable solution of CH+turn costs here: https://github.com/graphhopper/graphhopper/pull/1247 Import is still a lot slower and query time also a bit but the end result is correct and it already works for Germany-wide and potentially bigger areas.
The number of shortcuts with turn costs enabled is about 4x higher than without. For Berlin it is more like 250k now. In terms of memory note also that for turn costs we store two more ints (2x4bytes) for each shortcut.