Available with Network Analyst license.
This help topic provides information on how live traffic works. It covers OpenLR live traffic and TMC live traffic. For an overview of traffic, see What is traffic data.
OpenLR live traffic
OpenLR is an open standard for live traffic feed data. The network dataset can be configured to download OpenLR traffic feed data and associate it with network elements using network source feature geometry and attributes.
To create a working live-traffic network dataset configured for OpenLR, the following are required:
- Access to a live traffic service from ArcGIS Online portal or ArcGIS Enterprise portal, or access to traffic feeds from a data provider such as TomTom.
- Historical traffic data must be set up on the network dataset.
- The appropriate network attributes for Functional Road Class, Form of Way, Travel Direction, and Length.
- A time zone table, which must be stored in the same geodatabase as the network dataset you are working with. A time zone network attribute is created to get information from this table.
Configure OpenLR live traffic from a traffic service
Configure OpenLR live traffic by completing the following steps:
- Open the network dataset properties dialog box and click Traffic > Live Traffic.
- Check the Use the OpenLR Live Traffic check box to display the OpenLR properties that can be configured on a network dataset that supports live traffic.
- Map the OpenLR properties to their corresponding network dataset attributes as in the table below:
- Ensure your active portal is configured with live traffic.
- If your active portal is ArcGIS Online, enable the live traffic extension for your ArcGIS Online subscription. Contact Esri Customer Service to enable the live traffic extension.
- If your active portal is ArcGIS Enterprise, configure a traffic data service in your enterprise portal. To create the traffic data service, provide credentials from an ArcGIS Online subscription with the live traffic extension.
- Click the Active portal button and apply the changes by clicking OK.
OpenLR live traffic is configured and ready to be used while running a network analysis.
- After you have configured the Traffic Service to Active Portal, if you see a warning that mentions The OpenLR cache table is empty, run the BuildOpenLRCache geoprocessing tool using the following steps:
- Ensure Traffic Service is set to Active Portal and not None.
- In the Catalog pane, navigate to the Resources subfolder within the NetworkAnalyst folder in ArcGIS Pro install directory (for example, C:\Program Files\ArcGIS\Pro)
- Open the BuildOpenLRCache geoprocessing tool from the TrafficTools toolbox.
- In the tool dialog box, specify the network dataset that was configured with OpenLR live traffic in the Input Network Dataset Layer parameter.
- Run the geoprocessing tool.
Property | Explanation | SMP attribute |
---|---|---|
Functional Road Class | Road classification based on the importance of a road See the OpenLR technical paper for allowed values and their definition. | OpenLR FRC |
Form of Way | Physical road type See the OpenLR technical paper for allowed values and their definition. | OpenLR FOW |
Travel Direction | A network attribute that defines the allowed direction of travel along each street segment | Travel Direction |
Length | Distance with units defined | Miles or Kilometres |
Advanced settings for OpenLR live traffic
You can specify additional settings for a network dataset configured with OpenLR live traffic. These settings are stored in a traffic file that resides in the same folder as the geodatabase containing your network dataset. This section describes how to create a traffic file and the properties you can specify in the traffic file.
Note:
The traffic file is optional. When it is not present, Network Analyst assumes defaults for the properties that can be specified in the traffic file.
Dive-in:
The traffic file is a text file that stores the settings in the JavaScript Object notation (JSON) format. The content of this file should be valid JSON. To create or modify the traffic file, use a text editor that supports editing JSON files in order to prevent any syntax errors.
Create a text file and use the same name as your geodatabase containing the network dataset. Use the .traffic file extension. This file must be created in the same folder as your geodatabase. For example, if your geodatabase containing the network dataset is called NorthAmerica.gdb, create a text file named NorthAmerica.traffic.
The traffic file can contain the following properties:
- localCachePath—The folder where the traffic data cache should be stored on the computer. The specified folder should already exist. You can specify this location using an absolute path or using a path that is relative to the folder containing the geodatabase with the network dataset. For example, if you have a geodatabase called NorthAmerica.gdb in a folder called C:\data\routing, and you need to store the traffic data cache in a folder called C:\data\traffic-cache, you can specify the localCachePath as an absolute path such as C:/data/traffic-cache or using a relative path such as ../traffic-cache.
Dive-in:
The default location to store the traffic data cache is within the AppData folder on your computer such as C:\Users\<username>\AppData\Local\ESRI\Local Caches\TrafficCache
- cronScheduleSeconds—The duration, in seconds, after which the traffic cache data should be updated. The default value, when this property is not specified, is 300 seconds. This default works best for most scenarios. You should set this value higher than the default only if you do not want to update the traffic data cache frequently. Conversely, you can set it lower than the default if you need to update the cache more frequently. However, keep in mind that updating the traffic data cache more frequently may lower the performance of analyses performed on the network dataset, as resources on your computer will be used for both updating traffic data and performing analyses. The value should not be set lower than 60 seconds.
The example shows a traffic file that sets the folder to store the traffic data cache using a relative path. In this scenario, the network dataset is in a geodatabase called NorthAmerica.gdb within a folder called C:\data\routing. You want to store the traffic data cache in a folder called C:\data\traffic-cache.
{
"localCachePath": "../traffic-cache"
}
Configure OpenLR live traffic from traffic feeds
A network dataset can also be configured with OpenLR live traffic from traffic feeds provided by a data provider such as TomTom. This section describes how to configure the network dataset with OpenLR live traffic using traffic feeds.
You must create a traffic file following the steps described above. The traffic file must have the following properties:
- certPath—The path to a certificate file that stores an SSL certificate and a private key used to authenticate and securely communicate with the traffic feeds from the data provider. The file must have a .pem extension and include both the certificate as well as the private key. Instructions on how to request an SSL certificate to access OpenLR traffic feeds from TomTom can be found in the TomTom documentation.
- trafficFeeds—A list of traffic feeds for one or more geographic regions. Each feed is specified as an object made up of id, name, type, ffUrl, nffUrl, and incidentsUrl properties.
- localCachePath—The folder where the traffic data cache should be stored on the computer. The specified folder should already exist. You can specify this location using an absolute path or using a path that is relative to the folder containing the geodatabase with the network dataset. For example, if you have a geodatabase called NorthAmerica.gdb in a folder called C:\data\routing, and you need to store the traffic data cache in a folder called C:\data\traffic-cache, you can specify the localCachePath as an absolute path such as C:/data/traffic-cache or using a relative path such as ../traffic-cache.
Dive-in:
The default location to store the traffic data cache is in the AppData folder on your computer, such as C:\Users\<username>\AppData\Local\ESRI\Local Caches\TrafficCache
- cronScheduleSeconds—The duration, in seconds, after which the traffic cache data should be updated. The default value, when this property is not specified, is 300 seconds. This default works best for most scenarios. You should set this value higher than the default only if you do not want to update the traffic data cache frequently. Conversely, you can set it lower than the default if you need to update the cache more frequently. However, keep in mind that updating the traffic data cache more frequently may lower the performance of analyses performed on the network dataset, as resources on your computer will be used for both updating traffic data and performing analyses. The value should not be set lower than 60 seconds.
An example traffic file with traffic feeds for North America. In this scenario, the network dataset for North America is in a geodatabase called NorthAmerica.gdb that is stored in a folder called C:\data\routing. The northamerica.traffic file is stored in C:\data\routing folder. The certificate file called traffic-feeds-cert.pem file is also stored in the C:\data\routing folder. You want to store the traffic data cache in a folder called C:\data\traffic-cache.
{
"certPath": "../traffic-feeds-cert.pem",
"localCachePath": "../traffic-cache",
"cronScheduleSeconds": 300,
"trafficFeeds": [
{
"id": "CAN",
"name": "Canada",
"type": "TomTom",
"ffUrl": "https://cert-traffic.tomtom.com/tsq/hdf-detailed/CAN-HDF_DETAILED-TMCOPENLR/<APIKEY>/content.proto?flowType=ff",
"nffUrl": "https://cert-traffic.tomtom.com/tsq/hdf-detailed/CAN-HDF_DETAILED-TMCOPENLR/<APIKEY>/content.proto?flowType=nff",
"incidentsUrl": "https://cert-traffic.tomtom.com/tsq/hdt/CAN-HDT-TMCOPENLR/<APIKEY>/content.xml"
},
{
"id": "MEX",
"name": "Mexico",
"type": "TomTom",
"ffUrl": "https://cert-traffic.tomtom.com/tsq/hdf-detailed/MEX-HDF_DETAILED-TMCOPENLR/<APIKEY>/content.proto?flowType=ff",
"nffUrl": "https://cert-traffic.tomtom.com/tsq/hdf-detailed/MEX-HDF_DETAILED-TMCOPENLR/<APIKEY>/content.proto?flowType=nff",
"incidentsUrl": "https://cert-traffic.tomtom.com/tsq/hdt/MEX-HDT-TMCOPENLR/<APIKEY>/content.xml"
},
{
"id": "USA_M",
"name": "United States Middle",
"type": "TomTom",
"ffUrl": "https://cert-traffic.tomtom.com/tsq/hdf-detailed/USA_M-HDF_DETAILED-TMCOPENLR/<APIKEY>/content.proto?flowType=ff",
"nffUrl": "https://cert-traffic.tomtom.com/tsq/hdf-detailed/USA_M-HDF_DETAILED-TMCOPENLR/<APIKEY>/content.proto?flowType=nff",
"incidentsUrl": "https://cert-traffic.tomtom.com/tsq/hdt/USA_M-HDT-TMCOPENLR/<APIKEY>/content.xml"
},
{
"id": "USA_N",
"name": "United States North",
"type": "TomTom",
"ffUrl": "https://cert-traffic.tomtom.com/tsq/hdf-detailed/USA_N-HDF_DETAILED-TMCOPENLR/<APIKEY>/content.proto?flowType=ff",
"nffUrl": "https://cert-traffic.tomtom.com/tsq/hdf-detailed/USA_N-HDF_DETAILED-TMCOPENLR/<APIKEY>/content.proto?flowType=nff",
"incidentsUrl": "https://cert-traffic.tomtom.com/tsq/hdt/USA_N-HDT-TMCOPENLR/<APIKEY>/content.xml"
},
{
"id": "USA_SE",
"name": "United States Southeast",
"type": "TomTom",
"ffUrl": "https://cert-traffic.tomtom.com/tsq/hdf-detailed/USA_SE-HDF_DETAILED-TMCOPENLR/<APIKEY>/content.proto?flowType=ff",
"nffUrl": "https://cert-traffic.tomtom.com/tsq/hdf-detailed/USA_SE-HDF_DETAILED-TMCOPENLR/<APIKEY>/content.proto?flowType=nff",
"incidentsUrl": "https://cert-traffic.tomtom.com/tsq/hdt/USA_SE-HDT-TMCOPENLR/<APIKEY>/content.xml"
},
{
"id": "USA_SW",
"name": "United States Southwest",
"type": "TomTom",
"ffUrl": "https://cert-traffic.tomtom.com/tsq/hdf-detailed/USA_SW-HDF_DETAILED-TMCOPENLR/<APIKEY>/content.proto?flowType=ff",
"nffUrl": "https://cert-traffic.tomtom.com/tsq/hdf-detailed/USA_SW-HDF_DETAILED-TMCOPENLR/<APIKEY>/content.proto?flowType=nff",
"incidentsUrl": "https://cert-traffic.tomtom.com/tsq/hdt/USA_SW-HDT-TMCOPENLR/<APIKEY>/content.xml"
}
]
}
OpenLR live traffic workflow
When performing a network analysis, the traffic data source (which can be a traffic service or traffic feeds) is used to get the current live traffic values. These values are combined with the internal cache to create an interim cache that relates the element IDs directly to the speed values.
The traffic evaluator has fallback logic to determine what speed value to use if a live traffic speed value is not found.
Learn more about edge traffic evaluator
If there is a problem accessing the traffic data, the network analysis output will include a warning message.
TMC live traffic
TMC (Traffic Message Channel) is a standard format for live traffic feed data. The network dataset can be configured to download TMC live traffic feed data and associate it with network elements using a Streets-TMC table.
To create a working TMC live-traffic network dataset, the following are required:
- Access to a live traffic feed.
- Historical traffic data must be set up on the network dataset.
- A Streets-TMC table, which must be stored in the same geodatabase as the network dataset you are working with.
- A time zone table, which must be stored in the same geodatabase as the network dataset you are working with. A time zone network attribute is created to get information from this table.
Check the TMC Live Traffic check box to display the TMC properties that can be configured on a network dataset that supports live traffic.
TMC live traffic workflow
The network dataset reads live traffic speeds from dynamic traffic format (DTF) files and relates the speeds to edges using traffic message channel (TMC) codes. TMC codes are standard unique identifiers that are supported by various organizations, including traffic data providers. The following graphic and the text below illustrate and describe this process:
The network dataset queries an edge for the current travel time. This occurs when a network analysis layer is being solved or when traffic is being drawn on a map.
The identifying source feature information (source feature class, source feature, and from-to and to-from positions) is used to look up one or more TMC values. The lookup is performed with the information that was in the Streets-TMC Table at the time of the last network build. The Streets-TMC Table relates streets to TMC codes.
Dive-in:
The red box around the Streets-TMC Join Table in the diagram is there to highlight an oversimplification of the diagram. A network dataset doesn't directly reference the join table during the query process; that would be too slow. Instead, the information in the join table is built into the network dataset and referenced internally for faster processing. Consequently, any changes you make to the Streets-TMC table won't be incorporated into the network until it is rebuilt.
The network dataset looks for a DTF file, which is a binary file designed for network datasets, and reads the travel speed information. On the Live Traffic tab, you can specify the folder where the downloaded DTF files reside by clicking the browse button for the Folder option; or use the Service option to use the live traffic feeds from ArcGIS Online or an ArcGIS Enterprise portal that has a proxy to ArcGIS Online.
Each DTF file is marked with a valid time range and contains TMCs and their corresponding travel speeds for the given time span. The network dataset opens a DTF file only if the time and date for which the edge is being queried is within the DTF file's valid time range. In many cases, multiple DTF files have valid time ranges that are within the queried time. This can occur when live traffic includes traffic predictions of a given depth, for example, for the next 12 hours. If multiple, valid files exist for the queried time, the file that was created immediately before the queried time is opened.
Dive-in:
Only one DTF file is opened per solve. That is, if multiple, valid files exist, only one is used throughout the duration of that solve process. Whenever the solver queries an edge for a time and date outside the file's time range, it attempts to retrieve the travel time from historical traffic tables instead.
Once the DTF file is opened, the TMC and its associated travel speeds are combined with the length of the queried edge to determine the actual travel time.
If a valid TMC value or DTF file can't be found, the network dataset falls back to historical traffic to retrieve the travel time. If historical travel times don't exist, it falls back to either a weekend- or weekday-specific network cost attribute, depending on the day of the week for which the edge is being queried. This fallback sequence is set out in the edge traffic evaluators of the traffic-based cost attribute.
Streets-TMC table
The Streets-TMC table furnishes the information needed to relate edges to speed values that are stored in DTF files. Typically, this table is provided by a data vendor along with street data.
The table below lists the required fields of a Streets-TMC table, an example field name, the allowed data types, and a short description.
Note:
The Network Analyst tutorial data, which is available on ArcGIS.com, includes a San Diego network dataset with a Streets-TMC table for your reference. After downloading and extracting the data, you can find the San Diego geodatabase at \Network Analyst\Tutorial\SanDiego.gdb.
Field | Field name example | Data type | Description |
---|---|---|---|
Edge feature class identifier | EdgeFCID You must name this field EdgeFCID. | Long integer | Identifies the feature class that stores the street feature. |
Edge feature identifier | EdgeFID You must name this field EdgeFID. | Long integer | Identifies the street feature. |
Edge from position | EdgeFrmPos You must name this field EdgeFrmPos. | Double | Works in conjunction with EdgeToPos to identify a direction of travel or side of the street. Zero indicates the beginning of the line feature as defined by its digitized direction. One indicates the opposite end. For example, an EdgeFrmPos value of 0 and an EdgeToPos value of 1 identifies travel in the digitized direction of the line feature. The TMC value listed in the same record represents that side of the street only. Any decimal values specify a position along the digitized direction of the feature, which allows the Dissolve Network tool to maintain the proper TMC values for streets after edges have been dissolved together. |
Edge to position | EdgeToPos You must name this field EdgeToPos. | Double | Works in conjunction with EdgeFrmPos to identify a direction of travel or side of the street. |
TMC code | TMC | String | The TMC code representing the associated road segment. |
TMC Traffic feed type
You can select the source of live traffic to be used in your analysis by choosing one of the following options:
- None—Live traffic is not used during the analysis.
- Service—Access the traffic data service from ArcGIS Online or from your ArcGIS Enterprise portal configured to use this service. Access to this service is restricted to use with the ArcGIS StreetMap Premium dataset and requires the Live Traffic extension for your ArcGIS Online organization. In the Portal drop-down list, you will find all managed portals. Each portal has an icon next to it indicating a status.
- Green—The portal can obtain and return the live traffic helper service URLs and has no traffic feed authorization-related problems.
- Yellow—The network dataset has previously been updated to use a service. The organization of the signed-in user at that time was authorized to use traffic feeds. However, the organization of the currently signed-in user is not authorized at this time to use traffic feeds on this portal.
The following are examples:
- The organization of the currently signed-in user is not authorized for traffic. The signed-in user might have been for a different organization of the portal that is authorized. Or alternatively, it could be the same organization but they are no longer authorized for traffic feed service.
- The portal was previously set up, but the user is not currently signed in to the portal, so it cannot be used as an authorization portal for traffic feed.
- Red—The portal is not currently authorized for traffic feeds and cannot be chosen for authorization.
The following are examples:
- The portal is not licensed to use live traffic.
- The ArcGIS Enterprise portal's traffic data service has not been set up to come from ArcGIS Online. You can set up traffic data service for your ArcGIS Enterprise portal using the Configure Traffic Data Service dialog box.
- Folder—Choose this option to identify the folder where DTF files are downloaded. The path to the folder can be a local file system path or a Universal Naming Convention (UNC) path.
Modify TMC live traffic
Follow the steps below to modify a network's live traffic settings:
- Open the Network Dataset Properties dialog box.
- Click Traffic.
Two tabs, Historical Traffic and Live Traffic, appear. However, if the network dataset you're using was not configured to support traffic at the time it was created, these tabs will be unavailable.
- Click the Live Traffic tab and check the Use TMC Live Traffic check box.
- From the Streets-TMC Table drop-down list, choose the Streets-TMC table.
If your geodatabase does not have a valid Streets-TMC table candidate, the drop-down list will be empty.
DTF files created from traffic feeds store travel-speed information by TMC code. The Streets-TMC table relates TMC codes to street segments or subsections of street segments so that travel speeds can be linked ultimately to network edges. The Streets-TMC table is often included with network data acquired from a data vendor.
Learn more about the schema and attributes of a Streets-TMC table
- From the TMC drop-down list, choose the field in the Streets-TMC table that contains TMC codes.
- Depending on the source you want to use for live traffic feeds, choose from the following options: Service or Folder.
The path to the folder can be a local file system path or a UNC path.
Note:
You can set up the ArcGIS StreetMap Premium network dataset's live traffic from an ArcGIS Enterprise portal on a network dataset property page live traffic tab. The ArcGIS Enterpriseportal's live traffic service can be set up to come from ArcGIS Online using the new Configure Traffic Data Service dialog box.
Live traffic data status
Verify whether the live traffic data configuration is successful and the traffic data is updated by following the steps below:
- Open the network dataset properties dialog box and click Traffic > Live Traffic.
- Based on how the network dataset is configured, you should see one of the following:
- In the Live Traffic Data Status section, if the network dataset is configured with OpenLR live traffic, you should see Last update succeeded.
- If the network dataset is configured with TMC live traffic, you should see Live Traffic Source: TMC.
- In the Live Traffic Data Status section, if the network dataset is configured with OpenLR live traffic, you should see Last update succeeded.
- Click the Refersh live traffic data status button
to get the latest status for live traffic data.
Note:
Refresh does not update the traffic data but only updates the status.
Considerations
Consider the following when you are using OpenLR and TMC live traffic:
- OpenLR live traffic can only be used in ArcGIS Pro 3.2 or later.
- TMC live traffic should be configured if the network is to be used in earlier versions of ArcGIS Pro.
- OpenLR and TMC live traffic can both be configured at the same time on a network dataset.
- Configuring OpenLR live traffic is encouraged if the network is capable of supporting OpenLR and it will be used in ArcGIS Pro 3.2 or later.
- StreetMap Premium network datasets can be configured to use OpenLR live traffic when they meet the specified requirements.