TrafficFlow
public class TrafficFlow : TrafficFlowBase
extension TrafficFlow: NativeBase
extension TrafficFlow: Hashable
This class provides details about traffic flow along a GeoCorridor, inside a GeoCircle or a GeoBox, that represents particular path of the road network.
Backends for TrafficEngine and traffic vector tiles are different however backends may share the same data.
For additional information about fields, refer to Traffic API v7 API Reference: Traffic API v7.
Note: This is a beta release of this feature, so there could be a few bugs and unexpected behaviors. Related APIs may change for new releases without a deprecation process.
-
The reference speed in meters per second along the roadway when no traffic is present.
Declaration
Swift
public var freeFlowSpeedInMetersPerSecond: Double { get } -
A value for the amount of traffic on the roadway. The value, between 0.0 and 10.0, indicate the expected quality of travel. 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).
Declaration
Swift
public var jamFactor: Double { get } -
Defines the location affected by traffic flow.
Declaration
Swift
public var location: TrafficLocation { get } -
The expected speed in meters per second along the roadway; will not exceed the legal speed limit.
Declaration
Swift
public var speedInMetersPerSecond: Double? { get } -
The expected speed in meters per second that a car can drive along a roadway right now; may exceed the legal speed limit. It is based on probe data (GPS coordinates sent by vehicles or mobile devices driving along that roadway). The calculated ‘expected speed’ may be over the legal speed limit for that roadway because people are driving over the speed limit.
Declaration
Swift
public var speedUncappedInMetersPerSecond: Double? { get } -
The jamTendency field denotes whether the congestion is increasing, decreasing, or constant. The congestion tendency may take the following values:
- +2 - rapidly increasing congestion
- +1 - increasing congestion
- 0 - constant congestion
- -1 - decreasing congestion
- -2 - rapidly decreasing congestion Default value of 0 can be assumed when this attribute is not present.
Declaration
Swift
public var jamTendency: Int16? { get } -
The confidence field indicates the proportion of real-time data included in the speed calculation. It is a normalized value between 0.0 and 1.0 with the following meaning:
- 0.7 < confidence <= 1.0 indicates real time speeds
- 0.5 < confidence <= 0.7 indicates historical speeds
- 0.0 < confidence <= 0.5 indicates speed limit
This field can be used to identify whether the data for a location is derived from real-time probe sources or historical information only. All confidence data 0.71 and above is based on real-time information, where a confidence value of 0.75 or greater indicates high confidence real-time information. A confidence value equal to 0.70 or lower means that the data is derived from historical data only.
Declaration
Swift
public var confidence: Double? { get } -
The traversability of roadway.
Declaration
Swift
public var traversability: Traversability? { get } -
The traversability of junctions along the affected road.
Declaration
Swift
public var junctionsTraversability: JunctionsTraversability? { get }