We need the planet OSM file for our self-hosted Graphhopper environment. Receiving a route calculation within reasonable time (under 1 second), requires us to utilize contraction hierarchies. However, doing so removes the ability to enable avoid options like highways and toll roads.
What other options are there to achieve a optimized query speed while remaining functionality?
We are currently working on making CH more flexible, but this will take some time until it is fully functional. What kind of avoid options are you hoping to realize ? If you just need different setups for vehicles that can or cannot route on highways you can use multiple CH preparations for the different cases. Are you trying to avoid e.g. all highways or are you trying to avoid certain highways / toll roads only (on a per-request basis) ?
When preparing a route to ride on my bike, I donât want any highways or toll roads in my route (or at least as little as possible).
That is why I use the âch.disable=trueâ option combined with âavoid=motorway;tollâ.
That is what I want. But the server response is very slow.
Hope this explanation helps!
This sounds like all you need is a CH preparation for the bike profile then. Use graph.encoders=car,bike in your settings and specify vehicle=car/bike in your query (in case you want to make queries for cars (including highways) and bikes (excluding highways).
Thanks for your suggestion, but I donât think this is what I need, because without the âch.disable=trueâ option the calculation is too slow (answer from server takes to much time).