Documentation for tollways - values in geoJSON are unclear

Hi all,

I’m a bit new to OpenRouteService, so please excuse me if this is a naive question, but I am having trouble making sense of the directions service geoJSON output, in particular, the definition of the keys for tolls. For my project, I’m interested in the tolls one can encounter along a path, and when I run my query the relevant output looks like this:

My questions are:

  1. What does the array output under the "values’ key signify?
  2. Under summary, from the only documentation I can find (GitHub - GIScience/openrouteservice-docs: 📝 This repository stores the swagger specifications of the openrouteservice API. Browse to swagger for a detailed overview.), it seems like a value of “0” indicates that stretch of distance doesn’t have tolls while a value of “1” indicates that stretch of distance does. Is this correct?
  3. What are the units of “amount”? For reference, I queried directions from New York, NY, USA to Philadelphia, PA, USA. Does it know to use USD? Also, is “amount” the total value of tolls over that distance? If so, why is amount a positive number under the stretch with “value”: 0, which I presume means this stretch has no tolls?
  4. Finally, is there any way to get a list of toll roads on my path and their respective tolls?

Any help with this will be much appreciated! Also, if I am missing some documentation out there on the internet please point me in the right direction. Thanks very much in advance!

Hi @mason

Hopefully I can answer the first two at least:

  1. The values array is made up of individual arrays that identify changes in the “extra info” being requested, in this case tollways. So the [0,156,0] means that between points (vertices making up the route) 0 and 156 of the route, there is no tollway. The next item in the values array could be [157,160,1] which would then mean that between points 157 and 160 there is a tollway.

  2. Yes you are correct, 0 means no tollway, and 1 means a tollway for that stretch of the route

1 Like

Hi @adam,

Thank you so much for your help! If you ever have an idea for questions 3 and 4, please let me know :slight_smile:

Hi @mason,

  1. amount is just the percentage of the route distance. It adds up to 100.
  2. Not, via our API. If the data is available in OSM, you can suggest a feature or Idea on how to implement this in our backend repository.

The github wiki is deprecated and moved to github pages some time ago.

1 Like

Hi @amandus,

Thank you very much for your help! That clears up my confusion :slight_smile: