Dissolve Route Events (Linear Referencing)

Summary

Removes redundant information from event tables or separates event tables having more than one descriptive attribute into individual tables.

Usage

Syntax

DissolveRouteEvents_lr (in_events, in_event_properties, dissolve_field, out_table, out_event_properties, {dissolve_type}, {build_index})
ParameterExplanationData Type
in_events

The table whose rows will be aggregated.

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 which route each event is along. 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
dissolve_field
[dissolve_field,...]

The field(s)used to aggregate rows.

Field
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 which route each event is along.
  • 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
dissolve_type
(Optional)

Specifies whether the input events will be concatenated or dissolved.

  • DISSOLVEEvents will be aggregated wherever there is measure overlap. This is the default.
  • CONCATENATEEvents will be aggregated where the to-measure of one event matches the from-measure of the next event. This option is applicable only for line events.
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.

  • INDEXCreates an attribute index. This is the default.
  • NO_INDEXDoes not create an attribute index.
Boolean

Code Sample

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

env.workspace = "C:/Data"
arcpy.DissolveRouteEvents_lr("pavecond.dbf", "rkey LINE fmp tmp", "lanes", "pave_dissolve1.dbf", "rkey LINE fmp tmp")

 
DissolveRouteEvents Example 2 (Stand-alone Python Script)

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

# Name: DissolveRouteEvents_Example2.py
# Description:  Dissolve line events based on one field (input table is dBASE).
# Author: ESRI

# Import system modules 
import arcpy
from arcpy import env

# Set workspace
env.workspace = "D:/Data/pitt_county"

# Set local variables
in_tbl = "pavecond.dbf"
in_props = "rkey LINE fmp tmp"   # re-used as out event properties
flds = "lanes" 
out_tbl = "pave_dissolve1.dbf"

# Execute DissolveRouteEvents
arcpy.DissolveRouteEvents_lr(in_tbl, in_props, flds, out_tbl, in_props)
 
 
DissolveRouteEvents Example 3 (Stand-alone Python Script)

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

# Name: DissolveRouteEvents_Example3.py
# Description:  Concatenate line events based on two fields (input table is 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"          # re-used as out event properties
flds = "lanes; curb" 
out_tbl = "pave_dissolve2"

# Execute DissolveRouteEvents
arcpy.DissolveRouteEvents_lr(in_tbl, in_props, flds, out_tbl, in_props, "CONCATENATE")
 
DissolveRouteEvents Example 4 (Stand-alone Python Script)

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

# Name: DissolveRouteEvents_Example4.py
# Description: Concatenate line events based on two fields (input table is 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"          # re-used as out event properties
flds = "lanes; curb" 
out_tbl = "pave_dissolve2"

# Execute DissolveRouteEvents
arcpy.DissolveRouteEvents_lr(in_tbl, in_props, flds, out_tbl, in_props, "CONCATENATE")
 
DissolveRouteEvents Example 5 (Stand-alone Python Script)

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

# Name: DissolveRouteEvents_Example5.py
# Description: Dissolve line events based on two fields (input table is enterprise geodatabase).
# Author: ESRI 

# Import system modules
import arcpy
from arcpy import env

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

# Set local variables
in_tbl = gp.QualifyTableName("pavecond", wkspc) 
in_props = "rkey LINE fmp tmp" 
flds = "lanes; curb" 
out_tbl = "pave_dissolve3"
out_props = "rid LINE f_meas t_meas" 

# Execute DissolveRouteEvents
arcpy.DissolveRouteEvents_lr(in_tbl, in_props, flds, out_tbl, out_props, "#", "NO_INDEX")

Environments

Related Topics

Licensing Information

ArcView: Yes
ArcEditor: Yes
ArcInfo: Yes

Published 6/7/2010