com.esri.arcgis.geodatabase
Interface ITrafficDataManager

All Superinterfaces:
Serializable
All Known Implementing Classes:
TrafficDataManager

public interface ITrafficDataManager
extends Serializable

Provides editing capabilities for creating or deleting dynamic traffic files.

Remarks

ITrafficDataManager is used to generate the files that contain real-time traffic speed values associated with the edges in a network dataset.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.


Method Summary
 int convertTMCToKey(String tmcCode)
          Converts a TMC string to a unique integer key value.
 void deleteData(String feedFolderPath, Date utcCutoffDate)
          Deletes all dynamic traffic files in the specified folder which are older than the specified cutoff date.
 void insert(int key, IDoubleArray pTimeSliceSpeeds)
          Inserts the speed values per time slice for the specified TMC key.
 void startEditing(Date feedUTCStartTime, int estimatedKeyCount, int timeSliceCount, Date firstTimeSliceUTCStartTime, int timeSliceDurationInMinutes, int speedUnits, int updateIntervalInMinutes, int feedVersionNumber)
          Starts a new edit session for tracking edits to a new dynamic traffic file.
 void stopEditing(String feedFolderPath, boolean createCompressedFile)
          Stops the current edit session and writes all current edits to a new dynamic traffic file in the specified folder.
 

Method Detail

startEditing

void startEditing(Date feedUTCStartTime,
                  int estimatedKeyCount,
                  int timeSliceCount,
                  Date firstTimeSliceUTCStartTime,
                  int timeSliceDurationInMinutes,
                  int speedUnits,
                  int updateIntervalInMinutes,
                  int feedVersionNumber)
                  throws IOException,
                         AutomationException
Starts a new edit session for tracking edits to a new dynamic traffic file.

Remarks

StartEditing must be called before Insert and StopEditing, in order to begin the process of creating a dynamic traffic file.

EstimatedKeyCount should be a value close to the number of keys that are going to be inserted into the traffic file. This value is used to help manage memory allocation for inserts.

TimeSliceCount is the number of time ranges for which each key will have a speed.

FirstTimeSliceUTCStartTime is the time associated with the first time range for each inserted key.

TimeSliceDurationInMinutes is the duration, in minutes, that each time slice should represent.

SpeedUnits is the units of measurement that will be associated with the speed values included in key inserts.

UpdateIntervalInMinutes is used by the solver to know when it should attempt to retrieve the next available DTF. When scheduling traffic updates that repeat periodically, make this update interval value match how often new data updates occur.


The combination of TimeSliceCount, TimeSliceDurationInMinutes, and FirstTimeSliceUTCStartTime give the TrafficDataManager the information it needs to set up the schema of the dynamic traffic file. For example, 2 time slices of 15 minutes each that start at 08:00 will create 2 ranges of time from 08:00 to 08:14:59 and 08:15 to 08:29:59.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
feedUTCStartTime - The feedUTCStartTime (in)
estimatedKeyCount - The estimatedKeyCount (in)
timeSliceCount - The timeSliceCount (in)
firstTimeSliceUTCStartTime - The firstTimeSliceUTCStartTime (in)
timeSliceDurationInMinutes - The timeSliceDurationInMinutes (in)
speedUnits - A com.esri.arcgis.geodatabase.esriNetworkAttributeUnits constant (in)
updateIntervalInMinutes - The updateIntervalInMinutes (in)
feedVersionNumber - The feedVersionNumber (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

insert

void insert(int key,
            IDoubleArray pTimeSliceSpeeds)
            throws IOException,
                   AutomationException
Inserts the speed values per time slice for the specified TMC key.

Remarks

StartEditing must be called before Insert and StopEditing, in order to begin the process of creating a dynamic traffic file.


The Key value should be retrieved by passing a TMC to ConvertTMCToKey. Keys are used to replace TMC values, in order to change the alpha-numeric TMC value into a unique unsigned integer.

pTimeSliceSpeeds is an array of double values that must have an equivalent number of entries as the value passed to TimeSliceCount in StartEditing. The values in the array represent the speed associated with the TMC for each of the time slices.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
key - The key (in)
pTimeSliceSpeeds - A reference to a com.esri.arcgis.system.IDoubleArray (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

stopEditing

void stopEditing(String feedFolderPath,
                 boolean createCompressedFile)
                 throws IOException,
                        AutomationException
Stops the current edit session and writes all current edits to a new dynamic traffic file in the specified folder.

Remarks

StartEditing must be called before Insert and StopEditing, in order to begin the process of creating a dynamic traffic file.

FeedFolderPath is a path to the directory that will hold the dynamic traffic files.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
feedFolderPath - The feedFolderPath (in)
createCompressedFile - The createCompressedFile (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

deleteData

void deleteData(String feedFolderPath,
                Date utcCutoffDate)
                throws IOException,
                       AutomationException
Deletes all dynamic traffic files in the specified folder which are older than the specified cutoff date.

Remarks

When real-time traffic is updated regularly, there is the potential for the dynamic traffic files to accumulate beyond what is needed. Use DeleteData to clean up the dynamic traffic file folder to only contain the files referring to traffic after a specified date and time.

FeedFolderPath is a path to an existing directory that contains dynamic traffic files.

Any files that represent traffic from before the UTCCutoffDate will be deleted.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
feedFolderPath - The feedFolderPath (in)
utcCutoffDate - The utcCutoffDate (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

convertTMCToKey

int convertTMCToKey(String tmcCode)
                    throws IOException,
                           AutomationException
Converts a TMC string to a unique integer key value.

Remarks

The alpha-numeric TMC string values must be converted to unique integer key values in order to be used by Insert to place associated speeds in a dynamic traffic file.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
tmcCode - The tmcCode (in)
Returns:
The pKey
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.