Search code examples
here-api

Is there a way to make calculateRoute function take into account the waypoint radius?


When using calculate route api with !geo waypoints with radius https://developer.here.com/documentation/routing/dev_guide/topics/resource-param-type-waypoint.html i expect the routing algorithm to find a route (fastest, as defined in parameters) that passes through the surroundings of the waypoint.

Unfortunately, the radius is ignored, and the routing algorithm returns a route that passes precisely through the point - which can be ie. on the other side of the road. This causes a lot of unnecessary u-turns and makes the output unusable. Are the radius units meters, how to make the radius work as expected?

See sample request below: /routing/7.2/calculateroute.json?app_id=*****&app_code=*********&waypoint0=geo!52.59056113201988,13.400831222534181&waypoint1=geo!52.617119794673464,13.387699127197267,500&waypoint2=geo!52.63954788026919,13.364953994750978,500&mode=fastest;car;traffic:enabled&alternatives=0&departure=2019-12-11T05:31:08.633Z&routeAttributes=shape


Solution

  • Instead of comma it should be semicolon before the radius, so:

    ... waypoint1=geo!52.617119794673464,13.387699127197267;500& ...