Updating the purge rule on a real-time temporal layer


Purpose
This sample demonstrates the following:
  • Retrieving the temporal layers in a map or globe.
  • Retrieving and setting the purge rule used by a temporal feature class.
  • Setting the threshold and purge percentage properties for a temporal feature class.

How to use

See How to use ArcGIS samples for help on compiling, setting up the debugger, and running the sample. If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders. However, you will need to update the sample to point to the location of the data once you have extracted all the files.

  1. Open and build the .NET solution.
  2. Add the command to ArcMap, ArcGlobe, or an existing MapControl or GlobeControl application.
  3. Open a document that has at least one real-time temporal layer or add a real-time layer to your display.
  4. Click the command to have it show a dialog box for changing the purge rule settings.
  5. Select the temporal layer to which you want to change the settings.
  6. Modify purge rule settings and click Apply.

Additional information

The purge rule defines how real-time data is stored in the geodatabase. Tracking Analyst stores real-time data in-memory to eliminate the performance bottleneck of reading and writing data to disk. To limit the maximum amount of memory consumed, data must be periodically removed or purged from the geodatabase. The mechanism for specifying the data that is removed and how often, is called the "purge" rule. There are two methods available for removing records from the in-memory database—purge oldest and purge all except the latest.  

When using the purge oldest records setting, the oldest records are deleted from the geodatabase according to their time stamps. There are two parameters that determine when data is purged—the purge threshold and how much data to purge when the threshold has been reached.

The purge all except latest setting is intended for use with continuous observations, see Working with time data. As data is received, observations are grouped into tracks based on their event ID. The purge all except latest setting causes the previous observation for the track to be deleted when a new observation is received. This is useful if you only want to see the current location of the different tracks.

PurgeRuleForm.cs Demonstrates accessing and updating the purge rule for a real-time feed.
Download the C# files
PurgeRuleForm.vb Demonstrates accessing and updating the purge rule for a real-time feed.
Download the VB.NET files

Download the files for all languages




Additional Requirements
  • Access to real-time data served through a tracking server.

Development licensing Deployment licensing
Engine Developer Kit Engine: Tracking Analyst
ArcGIS for Desktop Basic: Tracking Analyst ArcGIS for Desktop Basic: Tracking Analyst
ArcGIS for Desktop Standard: Tracking Analyst ArcGIS for Desktop Standard: Tracking Analyst
ArcGIS for Desktop Advanced: Tracking Analyst ArcGIS for Desktop Advanced: Tracking Analyst