Can ORS support traffic?

Hey i have project to return distance and duration based on ORS API. I do research and I found that ORS doesn’t support traffic in real time so the duration should be not very accurate (correct me if im wrong). Is there any solution to solve that problem? I mean, i still want to show the duration from ORS API but maybe any methods that I can go for it so the duration can consider with traffic. Thanks for help

@Marcella0202 thank you for your request.

Providing live traffic is money intensive and not coverable with our free API quotas (currently). If you would like to use statistical traffic, we have an integration of HERE statistical traffic that you can use with your own hosted openrouteservice instance. You would need to buy the data from Here, of course. Be aware, since only very few have the resources to even buy statistical traffic data, we did not have many requirements to document this well in our public documentation.

Please reach out to us if you’re planning to use it, and we can see how to show you in the right direction.


Julian

Hello @Jules, I am in possession of the Here_Traffic data and have been able to use it successfully as ext_storage in ORS v6.6.4. I would currently like to upgrade to ORS v9.0.0. I have not found any documentation on how to use the data. I would like to be able to continue using it to perform statistical routing.

Best regards and thanks in advance
Felix

Hi @FeliPaul,

check our testing configuration which includes a dummy data set.

Have you tried defining an extended storage in your config?
You can find config examples in yml format eg. in our config migration tool.

If you are still having issues with getting it to work. Please provide your config an log outputs in case of errors.

Best regards

Hi @amandus,

thank you very much for your tip. With the following configuration snippet, I was able to successfully create the graph including the traffic data.

ORS Version: v9.0.0

Excerpt from my ors-config.yml:

---
ors:
  engine:
    profiles:
      driving-car:
        build:
          ext_storages:
            HereTraffic:
              enabled: true
              radius: 150
              streets: '/home/ors/files/here_traffic/Streets.shp'
              ref_pattern: '/home/ors/files/here_traffic/ref_pattern.csv'
              pattern_15min: '/home/ors/files/here_traffic/pattern_15min.csv'
              output_log: true
              log_location: '/home/ors/logs'

Either I have overlooked this so far or the documentation and the migration tool are incorrect in the point that the external storage (such as “HereTraffic”) must not be used under ors.engine.profiles.*.ext_storages.HereTraffic, but under ors.engine.profiles.*.build.ext_storages.HereTraffic.

After I indented “ext_storages:” below the “build:” key, the traffic data was successfully used to build the routing graph.


Off-topic: There is a typo “_” instead of “-” in the link url of the ext_storages documentation.

Actual:

<a href="#ext_storages">External storages</a>

Target:

<a href="#ext-storages">External storages</a>

Best regards