Routing API Developer's Guide

Effect of Elevation on Bicycle Speed

Bicycle routing considers elevation changes when determining what speed to use on a given road. When going up the hill, speed decreases, possibly down to the pedestrian speed. When going down the hill, speed increases. Exact values are not mentioned in the documentation, as those can change with every release. The speed profile cannot match all cyclists, multiple profiles might be introduced in the future.

Note: These examples use a HERE API Key to authenticate your request. For information on other possible options, see Authentication Guide. For examples of how to use the other authentication options with the Routing API, see Authentication Examples.

Elevation affects both route choice and estimated time to traverse the route. The following example shows how the ETA changes when going on the same road in two different directions.

https://route.ls.hereapi.com/routing/7.2/calculateroute.json
?apiKey={YOUR_API_KEY}
&waypoint0=geo!47.16757543377595,7.262282020247881
&waypoint1=geo!47.17349788688307,7.268998271621172
&mode=fastest;bicycle
https://route.ls.hereapi.com/routing/7.2/calculateroute.json
?apiKey={YOUR_API_KEY}
&waypoint0=geo!47.17349788688307,7.268998271621172
&waypoint1=geo!47.16757543377595,7.262282020247881
&mode=fastest;bicycle

First route, which goes up the hill, should have significantly higher ETA than the one going down the hill. In the time of writing this example, it was 405 seconds versus 144 seconds.

Elevation can be also returned in the response. It will be returned as third coordinate of a shape point.

https://route.ls.hereapi.com/routing/7.2/calculateroute.json
?apiKey={YOUR_API_KEY}
&waypoint0=geo!47.4242219248006,7.226144573449801
&waypoint1=geo!47.46701586747927,7.265097544012576
&mode=fastest;bicycle
&routeattributes=sh
&returnelevation=true

You can visualize this information, for example by colouring the route based on the slope or by displaying the elevation profile of the route.