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
-
The input table can be any type of table that ArcGIS supports. The output table can be a dBASE file or a geodatabase table.
-
If the input events do not have an ObjectID field, use Make Query Table prior to using this tool to add a virtual ObjectID field.
-
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.
-
The output table can be displayed in ArcMap using the Make Route Event Layer tool or using the Display Route Events command in ArcMap.
Syntax
Parameter | Explanation | Data 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 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 Measure Event Properties |
dissolve_type (Optional) |
Specifies whether the input events will be concatenated or dissolved.
| 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.
| Boolean |
Code Sample
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")
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)
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")
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")
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")