Skip To Content

Derive Event Measures

Summary

Populates and updates the Derived RouteID and measure values on point and line events with those fields configured and enabled.

Usage

  • This tool is designed to be executed as part of a larger workflow. The Apply Event Behaviors and Generate Routes tools should be run before executing Derive Event Measures. Running this tool without running the previous tools in the workflow may result in inaccurate data.

  • It is recommended to run this tool against the file geodatabase at initial migration of the data. It will run faster this way because the operation must modify every single event record in the database. Once in production, the tool can be run on only a selection set of the routes that have been modified to significantly reduce execution time.

  • The input event feature layer must have Derived RouteID and measure fields configured.

  • This tool can be run against one, multiple, or all events within a line network.

Syntax

DeriveEventMeasures_locref (in_route_features, {update_all_events}, {event_layers})
ParameterExplanationData Type
in_route_features

The LRS Network containing the events with Derived RouteID and measure fields configured.

Feature Layer
update_all_events
(Optional)

Determines whether all event feature classes in the network will be updated.

  • UPDATE_ALLUpdates all events in the network selected in in_route_features. This is the default.
  • UPDATE_SOMEDoes not update all events in the network selected in the in_route_features. Allows the user to select individual event layers in the event_layers parameter below.
Boolean
event_layers
[event_layers,...]
(Optional)

The event layers that will have Derived RouteID and measure fields updated.

Feature Layer

Code sample

DeriveEventMeasures example 1 (Python window)

The following Python window script demonstrates how to use DeriveEventMeasures in immediate mode.

# Import arcpy module
import arcpy

# Local variables
in_route_features = r'C:\Data\PipelineReferencing.gdb\LineNetwork'
update_all_events = "UPDATE_SOME"
event_layers = "Casing, Coating"

# Set current workspace
arcpy.env.workspace = "C:/Data/PipelineReferencing.gdb"

# Execute the tool
arcpy.DeriveEventMeasures_locref(in_route_features, update_all_events, event_layers)
DeriveEventMeasures example 2 (stand-alone script)

The following stand-alone Python script demonstrates how to use the DeriveEventMeasures tool.

# Name: DeriveEventMeasures_ex2.py
# Description: Populates/Updates the Derived RouteID and measure values on point and line events with those fields configured and enabled.
# Requirements: ArcGIS Pipeline Referencing

# Import arcpy module
import arcpy

# Check out any necessary licenses
arcpy.CheckOutExtension("LocationReferencing")

# Local variables
in_route_features = r'C:\Data\PipelineReferencing.gdb\LineNetwork'
update_all_events = "UPDATE_ALL"
event_layers = ""

# Execute the tool
arcpy.DeriveEventMeasures_locref(in_route_features, update_all_events, event_layers)

Environments

Licensing information

  • ArcGIS Desktop Basic: Requires ArcGIS Pipeline Referencing
  • ArcGIS Desktop Standard: Requires ArcGIS Pipeline Referencing
  • ArcGIS Desktop Advanced: Requires ArcGIS Pipeline Referencing

Related topics