arcpy.lr.DissolveRouteEvents(in_events, in_event_properties, dissolve_field, out_table, out_event_properties, {dissolve_type}, {build_index})
|
Name
|
Explanation
|
Data type
|
|
in_events
|
The table with the rows that will be aggregated.
|
Table View
|
|
in_event_properties
|
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 a numeric, text, or GUID field.
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
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 fields that will be used to aggregate rows.
|
Field
|
|
out_table
|
The table that will be created.
|
Table
|
|
out_event_properties
|
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. The field can be a numeric, text, or GUID field.
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. This field is required when the event type is POINT or LINE.
To-measure field—A field that will contain measure values. This field is required when the event type is LINE.
|
Route Measure Event Properties
|
|
dissolve_type
(Optional)
|
Specifies how the input events will be aggregated.
CONCATENATE—Events 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.
DISSOLVE—Events will be aggregated wherever there is measure overlap. This is the default.
|
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
DissolveRouteEvents example 1 (Python window)
The following Python window script demonstrates how to use the DissolveRouteEvents function.
import arcpy
arcpy.env.workspace = "C:/Data"
arcpy.lr.DissolveRouteEvents("pavecond.dbf", "rkey LINE fmp tmp", "lanes",
"pave_dissolve1.dbf", "rkey LINE fmp tmp")
DissolveRouteEvents example 2 (stand-alone 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).
# Import system modules
import arcpy
# Set workspace
arcpy.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"
# Run DissolveRouteEvents
arcpy.lr.DissolveRouteEvents(in_tbl, in_props, flds, out_tbl, in_props)
DissolveRouteEvents example 3 (stand-alone 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).
# 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" # re-used as out event properties
flds = "lanes;curb"
out_tbl = "pave_dissolve2"
# Run DissolveRouteEvents
arcpy.lr.DissolveRouteEvents(in_tbl, in_props, flds, out_tbl, in_props,
"CONCATENATE")
DissolveRouteEvents example 4 (stand-alone script)
The following Python script demonstrates how to use the DissolveRouteEvents function in a stand-alone Python script using enterprise geodatabase data.
# Name: DissolveRouteEvents_Example4.py
# Description: Dissolve line events based on two fields (input table is enterprise geodatabase).
# Import system modules
import arcpy
# Set workspace
arcpy.env.workspace = "C:/MyProject/myConn.sde"
# Set local variables
in_tbl = arcpy.ValidateTableName("pavecond", wkspc)
in_props = "rkey LINE fmp tmp"
flds = "lanes;curb"
out_tbl = "pave_dissolve3"
out_props = "rid LINE f_meas t_meas"
# Run DissolveRouteEvents
arcpy.lr.DissolveRouteEvents(in_tbl, in_props, flds, out_tbl, out_props, "#",
"NO_INDEX")