Powered by Zoomin Software. For more details please contactZoomin

HERE Traffic API v7 - Developer Guide

Product category
Technology
Doc type
Version
Product lifecycle
This publication

HERE Traffic API v7 - Developer Guide: Filter flow by jam factor

Filter flow by jam factor

The jamFactor field provides a value for the amount of traffic on the roadway. The value is between 0.0 and 10.0.

A value of 0.0 indicates that there is no congestion on the roadway. As the value approaches 10.0, it indicates increasing congestion. A value of 10.0 is reserved to represent a blocked roadway (closure).

When requesting flow, you can filter the response to receive only flow items that have jam factors between minJamFactor and maxJamFactor.

curl \
   -X GET \
   -H "Authorization: Bearer $TOKEN" \
   'https://data.traffic.hereapi.com/v7/flow?in=circle:52.50811,13.47853;r=2000&locationReferencing=olr&minJamFactor=1.0&maxJamFactor=2.1'
{
   "sourceUpdated":"2021-06-08T10:07:23Z",
   "results":[
      {
         "location":{
            "description":"Alt-Friedrichsfelde",
            "length":966.0,
            "olr":"CCoBEAAmJQmadyVXRQAJBQQBAkcACgUEAYpTAAfI/7QACQUEAQK3ADAAgxM="
         },
         "currentFlow":{
            "speed":13.888889,
            "speedUncapped":14.722222,
            "freeFlow":13.888889,
            "jamFactor":1.2,
            "confidence":0.99,
            "traversability":"open"
         }
      },
      {
         "location":{
            "description":"Rosenfelder Straße",
            "length":929.0,
            "olr":"CCoBEAAmJQmeJyVXKAAJBQQBArcACgUEAYpoAPgaAEkACQUEAQJFADCDTQA="
         },
         "currentFlow":{
            "speed":13.888889,
            "speedUncapped":14.722222,
            "freeFlow":13.611112,
            "jamFactor":2.0,
            "confidence":0.99,
            "traversability":"open"
         }
      },
      ...
   ]
}

The response above has been truncated for readability.

In case when no traffic information is available at the requested location within the requested jam factor range, the results will be an empty array:

{"sourceUpdated":null,"results":[]}

Was this article helpful?
TitleResults for “How to create a CRG?”Also Available inAlert