Configure External Event With LRS (Location Referencing)

摘要

Associates event data stored in an external system with an LRS.

使用情况

  • The geodatabase where the associated events are present and the geodatabase in which the LRS resides must be enterprise geodatabases.

  • This tool can also be used to modify the name, fields, and event behaviors for the existing configured external events.

参数

标注说明数据类型
Input Event

The external event feature class or table to be registered to an LRS.

Table View
Parent LRS Network

The LRS Network to which the event will be registered.

Feature Layer
LRS Event Name

The name of the external event or table that will be registered to the LRS.

String
Event ID Field

The event ID field available in the event feature class or table.

Field
Route ID Field

The name of the route ID field if it is a point event or a line event that does not span routes, or the name of the from route ID field if the event spans routes. The field must be available in the external event table or feature class.

Field
Measure Field

The name of the measure field if it is a point event or the name of the from measure field if it is a line event.

Field
Geometry Type
(可选)

Specifies the geometry type of the external event or table.

  • Point The geometry type of the event will be point. This is the default.
  • Line The geometry type of the event will be polyline.
String
To Measure Field
(可选)

The name of the to measure field. A field is only required for line events.

Field
From Date Field
(可选)

The from date field in the event feature class or table.

Field
To Date Field
(可选)

The to date field in the event feature class or table.

Field
Event Spans Routes
(可选)

Specifies whether the event records will span routes.

  • As isThe property will not change. This is the default.
  • Do not span routesThe event records will not span routes. This is applicable to line events only.
  • Spans routes The event records will span routes. This is applicable to line events only.
String
To Route ID Field
(可选)

The name of the to route ID field available in the event feature class or table.

Field
Store Route Name
(可选)

Specifies whether the route name will be stored with the event records.

  • As isThe property will not change. This is the default.
  • Do not store route nameThe route name will not be stored with the event records.
  • Store route nameThe route name will be stored with the event records.
String
Route Name Field
(可选)

The route name field if it is a point event or line event that does not span routes, or the name of the from route name field if the event spans routes. The field must be available in the external event table or feature class.

Field
To Route Name Field
(可选)

The to route name field for line events that span routes. This parameter is required if the Store Route Name and Event Spans Routes parameters are set.

Field
Calibrate Rule
(可选)

Specifies the event behavior rule for the calibrate activity.

  • Stay put The geographic location of the event will be preserved; measures may change. This is the default.
  • RetireBoth measure and geographic location will be preserved; the event will be retired.
  • MoveThe measures of the event will be preserved; the geographic location may change.
String
Retire Rule
(可选)

Specifies the event behavior rule for the retire activity.

  • Stay put The geographic location of the event will be preserved; measures may change. This is the default.
  • Retire Both measure and geographic location will be preserved; the event will be retired.
  • Move The measures of the event will be preserved; the geographic location may change.
String
Extend Rule
(可选)

Specifies the event behavior rule for the extend activity.

  • Stay put The geographic location of the event will be preserved; measures may change. This is the default.
  • Retire Both measure and geographic location will be preserved; the event will be retired.
  • Move The measures of the event will be preserved; the geographic location may change.
String
Reassign Rule
(可选)

Specifies the event behavior rule for the reassign activity.

  • Stay put The geographic location of the event will be preserved; measures may change. This is the default.
  • Retire Both measure and geographic location will be preserved; the event will be retired.
  • Move The measures of the event will be preserved; the geographic location may change.
  • Snap The geographic location of the event will be preserved by snapping the event to a concurrent route; measures may change.
String
Realign Rule
(可选)

Specifies the event behavior rule for the realign activity.

  • Stay put The geographic location of the event will be preserved; measures may change. This is the default.
  • Retire Both measure and geographic location will be preserved; the event will be retired.
  • Move The measures of the event will be preserved; the geographic location may change.
String

派生输出

标注说明数据类型
Output External Event Table

The updated external event table.

Table

arcpy.locref.ConfigureExternalEventWithLRS(in_event, parent_network, event_name, event_id_field, route_id_field, measure_field, {geometry_type}, {to_measure_field}, {from_date_field}, {to_date_field}, {event_spans_routes}, {to_route_id_field}, {store_route_name}, {route_name_field}, {to_route_name_field}, {calibrate_rule}, {retire_rule}, {extend_rule}, {reassign_rule}, {realign_rule})
名称说明数据类型
in_event

The external event feature class or table to be registered to an LRS.

Table View
parent_network

The LRS Network to which the event will be registered.

Feature Layer
event_name

The name of the external event or table that will be registered to the LRS.

String
event_id_field

The event ID field available in the event feature class or table.

Field
route_id_field

The name of the route ID field if it is a point event or a line event that does not span routes, or the name of the from route ID field if the event spans routes. The field must be available in the external event table or feature class.

Field
measure_field

The name of the measure field if it is a point event or the name of the from measure field if it is a line event.

Field
geometry_type
(可选)

Specifies the geometry type of the external event or table.

  • POINT The geometry type of the event will be point. This is the default.
  • LINE The geometry type of the event will be polyline.
String
to_measure_field
(可选)

The name of the to measure field. A field is only required for line events.

Field
from_date_field
(可选)

The from date field in the event feature class or table.

Field
to_date_field
(可选)

The to date field in the event feature class or table.

Field
event_spans_routes
(可选)

Specifies whether the event records will span routes.

  • AS_ISThe property will not change. This is the default.
  • NO_SPANS_ROUTESThe event records will not span routes. This is applicable to line events only.
  • SPANS_ROUTES The event records will span routes. This is applicable to line events only.
String
to_route_id_field
(可选)

The name of the to route ID field available in the event feature class or table.

Field
store_route_name
(可选)

Specifies whether the route name will be stored with the event records.

  • AS_ISThe property will not change. This is the default.
  • NO_STORE_ROUTE_NAMEThe route name will not be stored with the event records.
  • STORE_ROUTE_NAMEThe route name will be stored with the event records.
String
route_name_field
(可选)

The route name field if it is a point event or line event that does not span routes, or the name of the from route name field if the event spans routes. The field must be available in the external event table or feature class.

Field
to_route_name_field
(可选)

The to route name field for line events that span routes. This parameter is required if the store_route_name and event_spans_routes parameters are set.

Field
calibrate_rule
(可选)

Specifies the event behavior rule for the calibrate activity.

  • STAY_PUT The geographic location of the event will be preserved; measures may change. This is the default.
  • RETIREBoth measure and geographic location will be preserved; the event will be retired.
  • MOVEThe measures of the event will be preserved; the geographic location may change.
String
retire_rule
(可选)

Specifies the event behavior rule for the retire activity.

  • STAY_PUT The geographic location of the event will be preserved; measures may change. This is the default.
  • RETIRE Both measure and geographic location will be preserved; the event will be retired.
  • MOVE The measures of the event will be preserved; the geographic location may change.
String
extend_rule
(可选)

Specifies the event behavior rule for the extend activity.

  • STAY_PUT The geographic location of the event will be preserved; measures may change. This is the default.
  • RETIRE Both measure and geographic location will be preserved; the event will be retired.
  • MOVE The measures of the event will be preserved; the geographic location may change.
String
reassign_rule
(可选)

Specifies the event behavior rule for the reassign activity.

  • STAY_PUT The geographic location of the event will be preserved; measures may change. This is the default.
  • RETIRE Both measure and geographic location will be preserved; the event will be retired.
  • MOVE The measures of the event will be preserved; the geographic location may change.
  • SNAP The geographic location of the event will be preserved by snapping the event to a concurrent route; measures may change.
String
realign_rule
(可选)

Specifies the event behavior rule for the realign activity.

  • STAY_PUT The geographic location of the event will be preserved; measures may change. This is the default.
  • RETIRE Both measure and geographic location will be preserved; the event will be retired.
  • MOVE The measures of the event will be preserved; the geographic location may change.
String

派生输出

名称说明数据类型
out_external_event_table

The updated external event table.

Table

代码示例

ConfigureExternalEventWithLRS example 1 (Python window)

The following script demonstrates how to use the ConfigureExternalEventWithLRS function to configure an external point event in the Python window.

# Name: Configure_Externalevent_LRS_ex1.py
# Description: Configure an external point event in an LRS Network in the Python window.
# Requires: ArcGIS Location Referencing

# Check out license
arcpy.CheckOutExtension("LocationReferencing")

#Tool variables
in_event = "C:\\Eventdata.sde\\pointevent"
parent_network = "C:\\Networkdata.sde\\Network1"
event_name = "PointEvent"
event_id_field = "EventId"
route_id_field = "RouteId"
measure_field =  "Measure"
geometry_type = "POINT"
to_measure_field = None
from_date_field = "FromDate"
to_date_field =  "ToDate"
event_spans_routes =  "AS_IS"
to_route_id_field = None
store_route_name = "AS_IS"
route_name_field = None
to_route_name_field = None
calibrate_rule = "STAY_PUT"
retire_rule ="STAY_PUT"
extend_rule ="STAY_PUT"
reassign_rule ="STAY_PUT"
realign_rule ="STAY_PUT"

# set current workspace
#arcpy.env.workspace = "C:\\Networkdata.sde"

# execute the tool
arcpy.locref.ConfigureExternalEventWithLRS(in_event, parent_network, event_name, event_id_field, route_id_field, measure_field, geometry_type, to_measure_field, from_date_field, to_date_field, event_spans_routes, to_route_id_field, store_route_name, route_name_field, to_route_name_field, calibrate_rule, retire_rule, extend_rule, reassign_rule, realign_rule)

# Check in license
arcpy.CheckInExtension("LocationReferencing")
ConfigureExternalEventWithLRS example 2 (Python window)

The following script demonstrates how to use the ConfigureExternalEventWithLRS function to configure an external line event in the Python window.

# Name: Configure_Externalevent_LRS_ex2.py
# Description: Configure an external line event in an LRS Network in the Python window.
# Requires: ArcGIS Location Referencing

# Check out license
arcpy.CheckOutExtension("LocationReferencing")

#Tool variables
in_event = "C:\\Eventdata.sde\\lineevent"
parent_network = "C:\\Networkdata.sde\\Network1"
event_name = "LineEvent"
event_id_field = "EventId"
route_id_field = "RouteId"
measure_field =  "FromMeasure"
geometry_type = "LINE"
to_measure_field = "ToMeasure"
from_date_field = "FromDate"
to_date_field =  "ToDate"
event_spans_routes =  "AS_IS"
to_route_id_field = None
store_route_name = "STORE ROUTE NAME"
route_name_field = "RouteName"
to_route_name_field = None
calibrate_rule = "STAY_PUT"
retire_rule ="STAY_PUT"
extend_rule ="STAY_PUT"
reassign_rule ="STAY_PUT"
realign_rule ="STAY_PUT"

# set current workspace
arcpy.env.workspace = "C:\\Networkdata.sde"

# execute the tool
arcpy.locref.ConfigureExternalEventWithLRS(in_event, parent_network, event_name, event_id_field, route_id_field, measure_field, geometry_type, to_measure_field, from_date_field, to_date_field, event_spans_routes, to_route_id_field, store_route_name, route_name_field, to_route_name_field, calibrate_rule, retire_rule, extend_rule, reassign_rule, realign_rule)

# Check in license
arcpy.CheckInExtension('LocationReferencing')
ConfigureExternalEventWithLRS example 3 (Python window)

The following script demonstrates how to use the ConfigureExternalEventWithLRS function to modify an existing external line event in the Python window.

# Name: Configure_Externalevent_LRS_ex3.py
# Description: Modify an existing external line event in an LRS Network in the Python window. Event name and optional parameter fields are updated.
# Requires: ArcGIS Location Referencing

# Check out license
arcpy.CheckOutExtension("LocationReferencing")

#Tool variables
in_event = "C:\\Eventdata.sde\\lineevent"
parent_network = "C:\\Networkdata.sde\\Network1"
event_name = "LineEvent_updated"
event_id_field = "EventId_updated"
route_id_field = "RouteId_updated"
measure_field =  "FromMeasure_updated"
geometry_type = "LINE"
to_measure_field = "ToMeasure_updated"
from_date_field = "FromDate_updated"
to_date_field =  "ToDate_updated"
event_spans_routes =  "AS_IS"
to_route_id_field = None
store_route_name = "STORE_ROUTE_NAME" 
route_name_field = "FromRouteName_updated"
to_route_name_field = None
calibrate_rule = "RETIRE"
retire_rule ="RETIRE"
extend_rule ="RETIRE"
reassign_rule ="RETIRE"
realign_rule ="RETIRE"

# set current workspace
arcpy.env.workspace = "C:\\Networkdata.sde"

# execute the tool
arcpy.locref.ConfigureExternalEventWithLRS(in_event, parent_network, event_name, event_id_field, route_id_field, measure_field, geometry_type, to_measure_field, from_date_field, to_date_field, event_spans_routes, to_route_id_field, store_route_name, route_name_field, to_route_name_field, calibrate_rule, retire_rule, extend_rule, reassign_rule, realign_rule)

# Check in license
arcpy.CheckInExtension("LocationReferencing")
ConfigureExternalEventWithLRS example 4 (Stand-alone script)

The following stand-alone script demonstrates how to use the ConfigureExternalEventWithLRS function to configure an external line event spanning routes in an LRS Network.

# Name: Configure_Externalevent_LRS_ex4.py
# Description: Configure an external line event spanning routes in an LRS Network using a stand-alone Python script.
# Requires: ArcGIS Location Referencing

# Import arcpy module
import arcpy

# Check out license
arcpy.CheckOutExtension("LocationReferencing")

#Tool variables
in_event = "C:\\Eventdata.sde\\lineevent"
parent_network = "C:\\Networkdata.sde\\Network1"
event_name = "LineSpanningEvent"
event_id_field = "EventId"
route_id_field = "FromRouteId"
measure_field =  "FromMeasure"
geometry_type = "LINE"
to_measure_field = "ToMeasure"
from_date_field = "FromDate"
to_date_field =  "ToDate"
event_spans_routes =  "SPANS ROUTES"
to_route_id_field = "ToRouteId"
store_route_name = "STORE ROUTE NAME"
route_name_field = "FromRouteName"
to_route_name_field = "ToRouteName"
calibrate_rule = "STAY_PUT"
retire_rule ="STAY_PUT"
extend_rule ="STAY_PUT"
reassign_rule ="STAY_PUT"
realign_rule ="STAY_PUT"

# set current workspace
arcpy.env.workspace = "C:\\Networkdata.sde"

# execute the tool
arcpy.locref.ConfigureExternalEventWithLRS(in_event, parent_network, event_name, event_id_field, route_id_field, measure_field, geometry_type, to_measure_field, from_date_field, to_date_field, event_spans_routes, to_route_id_field, store_route_name, route_name_field, to_route_name_field, calibrate_rule, retire_rule, extend_rule, reassign_rule, realign_rule)

# Check in license
arcpy.CheckInExtension("LocationReferencing")
ConfigureExternalEventWithLRS example 5 (Stand-alone script)

The following stand-alone script demonstrates how to use the ConfigureExternalEventWithLRS function to modify an existing external line event spanning routes in an LRS Network.

# Name: Configure_Externalevent_LRS_ex5.py
# Description: Modify an existing external line event spanning routes of an LRS Network using a stand-alone Python script. Event name and optional parameter fields are updated.
# Requires: ArcGIS Location Referencing

# Import arcpy module
import arcpy 

# Check out license
arcpy.CheckOutExtension("LocationReferencing")

#Tool variables
in_event = "C:\\Eventdata.sde\\lineevent"
parent_network = "C:\\Networkdata.sde\\Network1"
event_name = "LineSpanningEvent_updated"
event_id_field = "EventId_updated"
route_id_field = "FromRouteId_updated"
measure_field =  "FromMeasure_updated"
geometry_type = "LINE"
to_measure_field = "ToMeasure_updated"
from_date_field = "FromDate_updated"
to_date_field =  "ToDate_updated"
event_spans_routes =  "SPANS ROUTES"
to_route_id_field = "ToRouteId_updated"
store_route_name = "STORE ROUTE NAME"
route_name_field = "FromRouteName_updated"
to_route_name_field = "ToRouteName_updated"
calibrate_rule = "RETIRE"
retire_rule ="RETIRE"
extend_rule ="RETIRE"
reassign_rule ="RETIRE"
realign_rule ="RETIRE"

# set current workspace
arcpy.env.workspace = "C:\\Networkdata.sde"

# execute the tool
arcpy.locref.ConfigureExternalEventWithLRS(in_event, parent_network, event_name, event_id_field, route_id_field, measure_field, geometry_type, to_measure_field, from_date_field, to_date_field, event_spans_routes, to_route_id_field, store_route_name, route_name_field, to_route_name_field, calibrate_rule, retire_rule, extend_rule, reassign_rule, realign_rule)

# Check in license
arcpy.CheckInExtension("LocationReferencing")

环境

此工具不使用任何地理处理环境。

许可信息

  • Basic: 需要 ArcGIS Location Referencing
  • Standard: 需要 ArcGIS Location Referencing
  • Advanced: 需要 ArcGIS Location Referencing

相关主题