HERE api traffic flow road segments, are they consistent? and how are they determined?

493 Views Asked by At

I am trying to get traffic flow data of a city from HERE API. the data are represented as linestrings (segments).

I run a request within a bounding box every 15 minutes, and every time I run one I get different number of roads segments. after testing, I found out that the segments are consistent in length and location (lat and lng), but the reason that I get different number of segments is that sometimes I get traffic data on certain roads that I didn't get any data before in previous requests, i.e., every request gives data for main roads but not always for sub-routes. it seems like it's depending on the density of cars at that time, am I correct? I ran the request 300 times now, I visualized the total segments I got (which are around 17000 segments), while I get around 8500 segments per request, most of them exist already. you can check the TRAFFIC SEGEMENTS VISUALIZATION. the colorful segments are from one request, and the light blue segments are the total segments I have. you can notice it indeed a request does not hold all segments.

so the questions are,

are the segments indeed consistent in length, lat and lng?

does HERE API depend on density of cars? if there is no cars at that time no data would be returned for a segment?

if I'm correct, why don't HERE API return all segments as free of traffic if there is no flow?

Thank you

1

There are 1 best solutions below

0
On

In order to answer your questions, please let me explain first how the Real-Time Traffic functionality works on Traffic API v7, according to the documentation you can see in the link I will leave in the comment, Real-Time Traffic comprises highly accurate data from multiple sources, including connected car probes, roadway sensors, and live operations centers. So the segments will always be consistent because they are updated almost every minute.

It also contains two types of traffic data:

Flow - information about the speed of travel and congestion along a segment of a roadway. Flow data is updated every minute.

Incidents - information about events that are affecting the flow of traffic or that may be important for drivers to know. Incident data is updated every two minutes.

And for your last questions, you can check how the flow is working: Flow contains a response data model with different parameters.

Speeds, Jam factor, Jam tendency, etc.

For the speeds parameter you can get the next information:

freeFlow - the reference speed along the roadway when no traffic is present

speed - the expected speed along the roadway; will not exceed the legal speed limit

speedUncapped - the expected speed along the roadway; may exceed the legal speed limit

And the 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).

We hope this information is helpful to you.

You can check our documentation about Traffic API v7:

https://developer.here.com/documentation/traffic-api/dev_guide/index.html