In this topic
About displaying time-aware data
Time-aware data in ArcGIS is any type of data that has an attribute containing time. The time value can be represented as a data type, numerical type, or text type. Many of the existing layers in ArcGIS are able to handle time data, such as FeatureLayers, TemporalFeatureLayers (from the Tracking Analyst extension), and the Raster Catalog layer.
The metadata associated with time data is not stored with the data, but defined for each layer that wants to display the time data. For example, the time zone of a particular dataset is stored in the layer displaying the data, not the feature class containing the data. To display time-aware data in your map, use a layer capable of handling time and configure the layer so that it understands the time data it will use.
The following are the three main interfaces used to configure a time-aware layer:
- ITimeData—Used to indicate that a layer is capable of handling time data and that it has been configured.
- ITimeTableDefinition—Used to specify all of the details about time data, such as the field name containing the time data and the format of that field.
- ITimeDataDisplay—Has properties that modify how the data is displayed, such as drawing all historical data or shifting the data to a different point in time.
If the data is stored as a numerical or text type, only certain formats are permitted. For a list of text formats, see the System's library enumeration, esriTimeStringFormat.
ITimeData interface
To become time aware, a layer must implement the ITimeData interface. This interface signals to the ArcGIS application that the layer is aware of the way time is handled in ArcGIS. It does not mean that the data is available to support time, merely that the layer was programmed to handle time-related data. Many of the existing layers in ArcGIS are able to handle time data. Custom layers can also implement this interface to advertise the ability to display time-related data.
The ITimeData interface includes the following properties:
- SupportsTime—Read-only property indicating if the layer supports time.
- UseTime—Used to turn time-based rendering on and off. If this property is set to true, the layer has been properly configured using the properties from the ITimeTableDefinition interface.
- TimeReference—Read-only property containing information, such as the time zone that was used when generating the data's Time field.
- GetFullTimeExtent—Read-only property containing the start time and end time that fully encloses all data in the layer. This is similar to the spatial extent of a layer, but in the Time domain.
ITimeTableDefinition interface
The ITimeTableDefinition interface allows programmers to access the metadata that is used by standard ArcGIS layers to interpret and display time-related data. These properties are the same values that can be modified by users through the standard Time tab in the Layer Properties panel. You can use this standard Time tab user interface (UI) for custom layers by using ITimeTableDefinition. By doing so, the layer honors any values that the user configures in the standard Time tab in the properties panel.
The ITimeTableDefinition interface includes the following properties:
- StartTimeFieldName—Indicates the field name in the table that contains the time at which the feature/object begins to exist.
- EndTimeFieldName—Indicates the field name in the table that contains the time at which the feature/object ceases to exist.
- TimeValueFormat—Indicates to the layer how time value is stored in the data. For example, if the time is stored as a text string, this property indicates the format of the text in the time field.
- TrackIDFieldName—Indicates the field name that identifies the object the feature/object represents.
- TimeReference—Indicates which time zone and daylight savings time values were used when the underlying data was recorded.
ITimeDataDisplay interface
The ITimeDataDisplay interface is used to control different options related to how a layer should display its time-related information. The properties in this interface are not strictly required, but can help to display the data in a more useful way.
The ITimeDataDisplay interface includes the following properties:
- TimeDataCumulative—Indicates if the layer should display only the data in the current display's time extent, or if all historical data (extending into the past from the current time extent) should be displayed cumulatively. Set this property to true if your data builds upon historical data. Set to false if each new piece of data replaces the previous one.
- TimeInterval—Specifies how often the data in the underlying dataset changes. For example, when using weather imagery that was collected every 10 minutes, set the TimeInterval to 10 and the TimeIntervalUnits to minutes. This property is used by tools, such as the Time Slider tool to determine how far on the timeline to move when animating the data. Set the TimeIntervalUnits with the TimeInterval property.
- TimeIntervalUnits—Specifies what time units are used to measure the TimeInterval property.
- TimeOffset—Used to change when the data in a layer is displayed relative to other layers. This property can be used to cause one layer to display at the same time as another layer, even if they were not recorded at the same time. For example, when comparing the outline of seasonal lakes from two different years (1998 and 1999), you can offset the 1998 data so that it is drawn in 1999. Set the TimeOffsetUnits with the TimeOffset property.
- TimeOffsetUnits—Specifies what time units are used to measure the TimeOffset property.
ITimeQueryFilter interface
When querying a layer for data, it is possible to use the time-related functionality in the layer to change how data is queried and returned. The ITimeQueryFilter interface is a special query filter that can be used to access this additional time-related functionality. It can be used to query for data in a specific time range. It can also be used to request that data be returned in a specific time zone.
The ITimeQueryFilter interface provides the following properties:
- TimeValue—Time extent that the query is requesting. Only data that falls inside this time extent will be returned.
- OutputTimeReference—Time zone and daylight savings rules that should be in effect for the data that is returned from the query. For example, if the data is being stored in the Atlantic time zone, and this property is set to the Pacific time zone, the data will be translated from Atlantic to Pacific time zones when it is returned.
Development licensing | Deployment licensing |
---|---|
ArcGIS for Desktop Basic | ArcGIS for Desktop Basic |
ArcGIS for Desktop Standard | ArcGIS for Desktop Standard |
ArcGIS for Desktop Advanced | ArcGIS for Desktop Advanced |