Overlay Route Events (Linear Referencing)

Summary

Overlays two event tables to create an output event table that represents the union or intersection of the input.

Usage

  • Line-on-line, line-on-point, point-on-line, and point-on-point event overlays can be performed.

  • The input and overlay events should be based on the same route reference.

  • The input tables can be any type of table that ArcGIS supports. The output table can be a .dbf file or a geodatabase table.

  • The Output Event Table parameter value can be displayed in a map using the Make Route Event Layer tool.

  • If both the input and overlay event properties are type Point, the output event properties must also be defined as type Point.

  • If both the input and overlay event properties are type Line, the output event properties must also be defined as type Line.

  • If either the input or overlay event properties are type Point, the output event properties must be defined as type Point when an Intersect overlay is performed. The output event properties must be defined as type Line when a Union overlay is performed.

  • If both the input and overlay event properties are type Point, only the points that have the exact same measure value are considered to intersect. There is no search tolerance.

  • An attribute index on the route identifier field speeds up the dynamic segmentation process. If you will be using the Output Event Table parameter value for dynamic segmentation, it is recommended that you choose to have an attribute index created.

  • Use the Make Table View tool prior to this tool to effectively reduce the number of events that will be processed.

  • If either the input or overlay events do not have an ObjectID field, use the Make Query Table tool prior to this tool to add a virtual ObjectID field.

Parameters

LabelExplanationData Type
Input Event Table

The input event table.

Table View
Input Event Table Properties

Parameter consisting of the route location fields and the type of events in the input event table.

  • Route Identifier Field—The field containing values that indicate the route on which each event is located. This field can be numeric or character.
  • Event Type—The type of events in the input event table (POINT or LINE).
    • POINT—Point events occur at a precise location along a route. Only a from-measure field must be specified.
    • LINE—Line events define a portion of a route. Both from- and to-measure fields must be specified.
  • From-Measure Field—A field containing measure values. This field must be numeric and is required when the event type is POINT or LINE. Note when the Event Type is POINT, the label for this parameter becomes Measure Field.
  • To-Measure Field—A field containing measure values. This field must be numeric and is required when the event type is LINE.
Route Measure Event Properties
Overlay Event Table

The overlay event table.

Table View
Overlay Event Table Properties

The route location fields and the type of events in the overlay event table.

Route Identifier Field—The field containing values that indicate which route each event is along. This field can be numeric or character.

Event Type—The type of events in the overlay event table (POINT or LINE).

  • POINT—Point events occur at a precise location along a route. Only the from-measure field must be specified.
  • LINE—Line events define a portion of a route. Both from- and to-measure fields must be specified.

From-Measure Field—The field containing from-measure values. This field must be numeric and is required when the event type is POINT or LINE. When Event Type is POINT, the label for this parameter becomes Measure Field.

To-Measure Field—The field containing to-measure values. This field must be numeric and is required when the event type is LINE.

Route Measure Event Properties
Type of Overlay

Specifies the type of overlay that will be performed.

  • IntersectOnly overlapping events will be written to the output event table. This is the default.
  • UnionAll events will be written to the output table. Linear events will be split at their intersections.
String
Output Event Table

The table to be created.

Table
Output Event Table Properties

Parameter consisting of the route location fields and the type of events that will be written to the output event table.

  • Route Identifier Field—The field that will contain values that indicate the route on which each event is located.
  • Event Type—The type of events the output event table will contain (POINT or LINE).
    • POINT—Point events occur at a precise location along a route. Only a single measure field must be specified.
    • LINE—Line events define a portion of a route. Both from- and to-measure fields must be specified.
  • From-Measure Field—A field that will contain measure values. Required when the event type is POINT or LINE. Note when the Event Type is POINT, the label for this parameter becomes Measure Field.
  • To-Measure Field—A field that will contain measure values. Required when the event type is LINE.
Route Measure Event Properties
Keep zero length line events
(Optional)

Specifies whether zero-length line events will be added to the Output Event Table parameter value. This parameter is only valid when the output event type is LINE.

  • Checked—Zero-length line events will be added. This is the default.
  • Unchecked—Zero-length line events will not be added.
Boolean
Include all fields from input
(Optional)

Specifies whether all the fields from the input and overlay event tables will be included in the Output Event Table parameter value.

  • Checked—All the fields from the input tables will be included in the output table. This is the default.
  • Unchecked—Not all fields from the input tables will be included in the output table. Only the ObjectID field and the route location fields will be included.
Boolean
Build index
(Optional)

Specifies whether an attribute index will be created for the route identifier field that is written to the Output Event Table parameter value.

  • Checked—An attribute index will be created. This is the default.
  • Unchecked—An attribute index will not be created.
Boolean

arcpy.lr.OverlayRouteEvents(in_table, in_event_properties, overlay_table, overlay_event_properties, overlay_type, out_table, out_event_properties, {zero_length_events}, {in_fields}, {build_index})
NameExplanationData Type
in_table

The input event table.

Table View
in_event_properties

Parameter consisting of the route location fields and the type of events in the input event table.

  • Route Identifier Field—The field containing values that indicate the route on which each event is located. This field can be numeric or character.
  • Event Type—The type of events in the input event table (POINT or LINE).
    • POINT—Point events occur at a precise location along a route. Only a from-measure field must be specified.
    • LINE—Line events define a portion of a route. Both from- and to-measure fields must be specified.
  • From-Measure Field—A field containing measure values. This field must be numeric and is required when the event type is POINT or LINE. Note when the Event Type is POINT, the label for this parameter becomes Measure Field.
  • To-Measure Field—A field containing measure values. This field must be numeric and is required when the event type is LINE.
Route Measure Event Properties
overlay_table

The overlay event table.

Table View
overlay_event_properties

The route location fields and the type of events in the overlay event table.

Route Identifier Field—The field containing values that indicate which route each event is along. This field can be numeric or character.

Event Type—The type of events in the overlay event table (POINT or LINE).

  • POINT—Point events occur at a precise location along a route. Only the from-measure field must be specified.
  • LINE—Line events define a portion of a route. Both from- and to-measure fields must be specified.

From-Measure Field—The field containing from-measure values. This field must be numeric and is required when the event type is POINT or LINE. When Event Type is POINT, the label for this parameter becomes Measure Field.

To-Measure Field—The field containing to-measure values. This field must be numeric and is required when the event type is LINE.

Route Measure Event Properties
overlay_type

Specifies the type of overlay that will be performed.

  • INTERSECTOnly overlapping events will be written to the output event table. This is the default.
  • UNIONAll events will be written to the output table. Linear events will be split at their intersections.
String
out_table

The table to be created.

Table
out_event_properties

Parameter consisting of the route location fields and the type of events that will be written to the output event table.

  • Route Identifier Field—The field that will contain values that indicate the route on which each event is located.
  • Event Type—The type of events the output event table will contain (POINT or LINE).
    • POINT—Point events occur at a precise location along a route. Only a single measure field must be specified.
    • LINE—Line events define a portion of a route. Both from- and to-measure fields must be specified.
  • From-Measure Field—A field that will contain measure values. Required when the event type is POINT or LINE. Note when the Event Type is POINT, the label for this parameter becomes Measure Field.
  • To-Measure Field—A field that will contain measure values. Required when the event type is LINE.
Route Measure Event Properties
zero_length_events
(Optional)

Specifies whether zero-length line events will be added to the out_table parameter value. This parameter is only valid when the output event type is LINE.

  • ZEROZero-length line events will be added. This is the default.
  • NO_ZEROZero-length line events will not be added.
Boolean
in_fields
(Optional)

Specifies whether all the fields from the input and overlay event tables will be included in the out_table parameter value.

  • FIELDSAll the fields from the input tables will be included in the output table. This is the default.
  • NO_FIELDSNot all fields from the input tables will be included in the output table. Only the ObjectID field and the route location fields will be included.
Boolean
build_index
(Optional)

Specifies whether an attribute index will be created for the route identifier field that is written to the out_table parameter value.

  • INDEXAn attribute index will be created. This is the default.
  • NO_INDEXAn attribute index will not be created.
Boolean

Code sample

OverlayRouteEvents example 1 (Python window)

The following Python window script demonstrates how to use the OverlayRouteEvents function.

import arcpy
arcpy.env.workspace = "C:/Data"
arcpy.OverlayRouteEvents_lr("accident.dbf", "rkey POINT mile", "pavecond.dbf", 
                            "rkey LINE fmp tmp", "INTERSECT", "accpav", 
                            "rkey POINT mile" )
OverlayRouteEvents example 2 (stand-alone script)

The following Python script demonstrates how to use the OverlayRouteEvents function in a stand-alone Python script.

# Description: Point-on-line INTERSECT overlay (both tables are dBASE)

# Import system modules 
import arcpy

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

# Set local variables
in_tbl = "accident.dbf"
in_props = "rkey POINT mile"  # reused as out event properties
ov_tbl = "pavecond.dbf"
ov_props = "rkey LINE fmp tmp"
out_tbl = "accpav"

# Execute OverlayRouteEvents
arcpy.OverlayRouteEvents_lr(in_tbl, in_props, ov_tbl, ov_props, "INTERSECT", 
                            out_tbl, in_props)
OverlayRouteEvents example 3 (stand-alone script)

The following Python script demonstrates how to use the OverlayRouteEvents function in a stand-alone Python script using file geodatabase data.

# Description: Line-on-line UNION overlay (both tables are in a file 
#              geodatabase)

# Import system modules
import arcpy

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

# Set local variables
in_tbl = "pavecond"
in_props = "rkey LINE fmp tmp"  # reused as overlay and out event properties
ov_tbl = "pavetype"
out_tbl = "condtype" 

# Execute OverlayRouteEvents
arcpy.OverlayRouteEvents_lr(in_tbl, in_props, ov_tbl, in_props, "UNION", 
                            out_tbl, in_props, "NO_ZERO")
OverlayRouteEvents example 4 (stand-alone script)

The following Python script demonstrates how to use the OverlayRouteEvents function in a stand-alone Python script using enterprise geodatabase data.

# Description: Point-on-line INTERSECT overlay (both tables are in enterprise 
#              geodatabase)

# Import system modules 
import arcpy

# Set workspace
arcpy.env.workspace = "C:/MyProject/myConn.sde"

# Set local variables
in_tbl = arcpy.ValidateTableName("accident", wkspc)
in_props = "rkey POINT mile"  
ov_tbl = arcpy.ValidateTableName("pavecond", wkspc) 
ov_props = "rkey LINE fmp tmp"
out_tbl = "accpav"
out_props = "routekey POINT milepost"  # names are changed for out table

# Execute OverlayRouteEvents
arcpy.OverlayRouteEvents_lr(in_tbl, in_props, ov_tbl, ov_props, "INTERSECT", 
                            out_tbl, out_props)

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics