API details: detourFactor and percentage

Hi I wanted to know if there is a detailed explanation of the attributes “detourfactor” and “percentage” that can be requested via the directions API. I didn’t find anything in the api-doc or on the github response documentation on this topic.
I get their generic idea, but to really display them to a user with a reasonable explanation I lack details:

  • Is percentage the spatial percentage or the temporal percentage? Or something in between like “perceived percentage”?
  • Is a big detourfactor meaning that there exists a lot shorter route? Is it tightly coupled to the routing preference chosen (i.e. fastest-recommended-shortest). Is shortest guaranteed to mean a detourfactor of zero? Is that factor to be interpreted linearly, if yes what would a value of 0.5 in the middle mean? How would you explain that value to a end user?

Hi @DanDits,

both only regard the spatial dimension.

detourfactor: basically the difference from a straight line from start to end in terms of distance.
A route with double the distance compared to straight line from A to B would have a detourfactor of 2.

percentage: is the amount of each segments length in relation to the total length.

There is a basic description for the response parameters in the Response tab of the API Playground if you click on the green question mark like for other parameters.

I admit it’s a bit hidden, but it basically is still a prototype that didn’t get too much attention.
Please refer to the basic POST endpoint (link above) for routing responses, the other endpoins are still missing information there).

Best regards

Thanks a lot for your quick and in debt help. I in fact did not find this explanation, probably because I just had a look at the /geojson variant which just says “features ([object])”.