What is a round_trip?

Hey there, I am just getting started with Graphhopper and so far it looks very very promising.

I tried the round_trip param but not sure what it really does?!? It calculates an random path starting at a given point, right? With a distance of about 10km (per default). And I can influence it by also giving a heading and a seed param.

But it’s not possible to say… Hey… I want to go to point X, give me a round_trip to that point and back to the start?!?

You could achieve something like this with algorithm=alternative_route and pick the combination with the biggest area in-between. The previous round trip algorithm did this (but with a random destination) but it was removed as the new one is better for one starting point. See here for the old: https://github.com/graphhopper/graphhopper/blob/0e54efe5a44a3e2b035dfa3c2bfab45cd5a4dce0/core/src/main/java/com/graphhopper/routing/RoundTripAltAlgorithm.java

Ok… sounds like a good option… thanks for the quick support here!!!

1 Like