ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Live Traffic Data

  • Summary
  • Properties
  • Code sample

Summary

Provides information about the live traffic information stored in the network dataset such as the streets—TMC join table and the path to the DTF files.

Properties

PropertyExplanationData Type
tmcTableName
(Read Only)

The name of the table that contains the relationship between streets and traffic messaging channel (TMC) codes.

String
tmcFieldName
(Read Only)

The name of the field within the Streets—TMC join table that contains the TMC codes.

String
trafficFeedLocation
(Read Only)

The path to the location where DTF files are stored. The network dataset reads the DTF files from this location to get the live traffic data.

String

Code sample

Live Traffic Data Properties example

Display a summary of the live traffic information for the network dataset.

# Name: NDSLiveTrafficDataProperties_ex01.py
# Description: Print live traffic information for the network dataset.

import arcpy
import sys

# Set the workspace
arcpy.env.workspace = "C:/Data/SanDiego.gdb/Transportation"

# Create Describe object for the network dataset
desc = arcpy.Describe("Streets_ND")

#Get the historical traffic data object
if desc.supportsLiveTrafficData:
    traffic = desc.liveTrafficData
else:
    #If the directions are not set for the network dataset, exit 
    print "No live traffic information"
    sys.exit() 

print "Live Traffic Information ----" 
print "TMC Table Name: " , traffic.tmcTableName
print "TMC Field Name: " , traffic.tmcFieldName 
print "Traffic Feed: " , traffic.trafficFeedLocation

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal