Circular route without using waypoints

Hi,

Im looking for an API with the capability of routing back to the start location in a circular route, optimising for factors such as distance and elevation. Having looked through the documentation i cant see a way to do this using this API without using waypoints, which is not ideal.

Before i give up and try an API from someone else, does anyone know if this is possible?

Thanks
Alex

Why providing waypoints is not ideal?

Hi @maloleps

The users of the app will be in different locations, i would like to create a circular rout that brings the user back to their start location, with the route taken determined by distance and geography. As i dont know where the user is going to be, i am unable to choose waypoints, i also need the route to be set from the beginning rather than dynamically take the user back to the start location once they have started moving.

Essentially this is what i need to the API factor in to my route:
-Origin: (User location)
-End point: (User location)
-Distance: (3 miles)
-Max altitude gained: (50m)

Hi @xanderxxz,
Can I ask what is the main purpose of your application? Will it be a kind of sport / fitness app (runnig or biking)?

Hi @olkowicz

It will be a sports app…

Hi @xanderxxz ,

Generally - a tough one :slight_smile: There is a possibility to calculate route close to what you request - e.g. based on radius app could add waypoints and provide route through them. Or based on the reachable range.
The issue is with the second part of your question: to use specified elevation… I cannot find a simple way to use it in calculations.

Hi @olkowicz

Thanks for your help, it does seem that there is no inbuilt method for achieving this, thanks for confirming - I’m looking for a ready made solution which i have found in another API so i will move away from using this one.

Out of curiosity - what API does provide this kind of functionality? :slight_smile:

From the documentation it seems like “Graphhopper API” has the ability to produce circular routes, it is also meant to integrate with other maps providers which I’m hoping will give me the functionality to calculate the terrain changes along the route - though this needs further investigation - what i need is similar to how google maps shows you the change in elevation along a planned route so im sure it must be possible with other providers…

Using Graphhopper though is alot more work than using a service like TomTom or Google maps which has the maps and navigation APIs combined - and have alot of documentation behind them - hence the question in the first place :stuck_out_tongue: