ArcGIS for Desktop

  • Documentation
  • Pricing
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS for Desktop

A complete professional GIS

ArcGIS for Server

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Pricing
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Overlay Route Events

  • Summary
  • Usage
  • Syntax
  • Code Sample
  • Environments
  • Licensing Information

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 dBASE file or a geodatabase table.

  • The output table can be displayed in ArcMap using the Make Route Event Layer tool or using the Display Route Events command in ArcMap.

  • 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 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.

Syntax

OverlayRouteEvents_lr (in_table, in_event_properties, overlay_table, overlay_event_properties, overlay_type, out_table, out_event_properties, {zero_length_events}, {in_fields}, {build_index})
ParameterExplanationData 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

Parameter consisting of 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 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_type

The type of overlay to be performed.

  • INTERSECT —Writes only overlapping events to the output event table. This is the default.
  • UNION —Writes all events to the output table. Linear events are 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 to keep zero length line events in the output table. This parameter is only valid when the output event type is LINE.

  • ZERO —Keeps zero length line events. This is the default.
  • NO_ZERO —Does not keep zero length line events.
Boolean
in_fields
(Optional)

Specifies whether all the fields from the input and overlay event tables will be written to the output event table.

  • FIELDS —Includes all the fields from the input tables in the output table. This is the default.
  • NO_FIELDS —Does not include all the fields from the input tables in the output table. Only the ObjectID and the route location fields are kept.
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.

  • INDEX —Creates an attribute index. This is the default.
  • NO_INDEX —Does not create an attribute index.
Boolean

Code Sample

OverlayRouteEvents Example (Python Window)
import arcpy
from arcpy import env

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 (Stand-alone Python Script)

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

# NAme: OverlayRouteEvents_Example.py
# Description: Point-on-line INTERSECT overlay (both tables are dBASE)
# Author: ESRI

# Import system modules 
import arcpy
from arcpy import env

# Set workspace
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 2 (Stand-alone Python Script)

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

# Name OverlayRouteEvents_Example2.py
# Description: Line-on-line UNION overlay (both tables are in a file geodatabase)
# Author: ESRI

# Import system modules
import arcpy
from arcpy import env

# Set workspace
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 3 (Stand-alone Python Script)

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

# Name: OverlayRouteEvents_Example3.py
# Description: Line-on-line UNION overlay (both tables are in a personal geodatabase)
# Author: ESRI

# Import system modules
import arcpy
from arcpy import env

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

# 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 Python Script)

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

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

# Import system modules 
import arcoy
from arcpy import env

# Set workspace
env.workspace = "Database Connections/Connection to Jerry.sde"

# Set local variables
in_tbl = gp.QualifyTableName("accident", wkspc)
in_props = "rkey POINT mile"  
ov_tbl = gp.QualifyTableName("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)

Environments

  • Current Workspace
  • Output CONFIG Keyword
  • Scratch Workspace

Licensing Information

  • ArcGIS for Desktop Basic: Yes
  • ArcGIS for Desktop Standard: Yes
  • ArcGIS for Desktop Advanced: Yes

Related Topics

  • An overview of the Linear Referencing toolbox
  • About overlaying event data
Feedback on this topic?

ArcGIS for Desktop

  • Home
  • Documentation
  • Pricing
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS for Desktop
  • ArcGIS for Server
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal