Modify LRS Event (Location Referencing)

Resumen

Modifies properties of a linear referencing system (LRS) event.

Uso

  • Modified fields should have the properties outlined in the ArcGIS Pipeline Referencing events data model and in the ArcGIS Roads and Highways events data model.

  • This tool can be used to add or remove the following properties from an event:

    Present Event for a Continuous Network

    Event typeSupports route nameSupports spanning routes

    Line

    No

    N/A

    Line

    Yes

    N/A

    Point

    No

    N/A

    Point

    Yes

    N/A

    Modified Event for a Continuous Network

    Event typeSupports route nameSupports spanning routes

    Line

    Yes

    N/A

    Line

    No

    N/A

    Point

    Yes

    N/A

    Point

    No

    N/A

    Present Event for an Engineering Network

    Event typeSupports route nameSupports spanning routes

    Line

    No

    No

    Line

    Yes

    No

    Line

    Yes

    No

    Line

    Yes

    Yes

    Point

    No

    N/A

    Point

    Yes

    N/A

    Modified Event for an Engineering Network

    Event typeSupports route nameSupports spanning routes

    Line

    Yes

    No

    Line

    No

    No

    Line

    Yes

    Yes

    Line

    Yes

    No

    Point

    Yes

    N/A

    Point

    No

    N/A

Parámetros

EtiquetaExplicaciónTipo de datos
LRS Event Feature Class

The input feature class or feature layer for the event.

Feature Layer
Event ID Field

Name of the event ID field.

Field
Route ID Field

Name of the route ID field.

Field
From Date Field

Name of the from date field.

Field
To Date Field

Name of the to date field.

Field
Location Error Field

Name of the location error field.

Field
Measure Field

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

Field
To Measure Field
(Opcional)

Name of the to measure field. Required only for line events.

Field
Event Spans Routes
(Opcional)
  • As isNo change to the property. This is the default.
  • Do not span routesThe event records do not span routes. Applicable only for line events.
  • Spans routes The event records may span routes. Applicable only for line events.
String
To Route ID Field
(Opcional)

Name of the to route ID field. Required only if it is a line event and it spans routes.

Field
Store Route Name
(Opcional)
  • As isNo change to the property. This is the default.
  • Do not store route nameDoes not store the route name with the event records.
  • Store route nameStores the route name with the event records.
String
Route Name Field
(Opcional)

The route name field if it is a point event that does not span routes, or the from route name field if it is a line event that spans routes. Required if Store Route Name is enabled.

Field
To Route Name Field
(Opcional)

Name of the to route name field. Required if it is a line event, Store Route Name is chosen, and it spans routes.

Field

Salida derivada

EtiquetaExplicaciónTipo de datos
Updated LRS Event Feature Class

The updated event feature layer.

Feature Layer

arcpy.locref.ModifyLRSEvent(in_feature_class, event_id_field, route_id_field, from_date_field, to_date_field, loc_error_field, measure_field, {to_measure_field}, {event_spans_routes}, {to_route_id_field}, {store_route_name}, {route_name_field}, {to_route_name_field})
NombreExplicaciónTipo de datos
in_feature_class

The input feature class or feature layer for the event.

Feature Layer
event_id_field

Name of the event ID field.

Field
route_id_field

Name of the route ID field.

Field
from_date_field

Name of the from date field.

Field
to_date_field

Name of the to date field.

Field
loc_error_field

Name of the location error field.

Field
measure_field

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

Field
to_measure_field
(Opcional)

Name of the to measure field. Required only for line events.

Field
event_spans_routes
(Opcional)

Determines if the event records will span routes.

  • AS_ISNo change to the property. This is the default.
  • NO_SPANS_ROUTESThe event records do not span routes. Applicable only for line events.
  • SPANS_ROUTES The event records may span routes. Applicable only for line events.
String
to_route_id_field
(Opcional)

Name of the to route ID field. Required only if it is a line event and it spans routes.

Field
store_route_name
(Opcional)

Determines if the event records will store the route name.

  • AS_ISNo change to the property. This is the default.
  • STORE_ROUTE_NAMEStores the route name with the event records.
  • NO_STORE_ROUTE_NAMEDoes not store the route name with the event records.
String
route_name_field
(Opcional)

The route name field if it is a point event that does not span routes, or the from route name field if it is a line event that spans routes. Required if STORE_ROUTE_NAME is set.

Field
to_route_name_field
(Opcional)

Name of the to route name field. Required if it is a line event, and store_route_name and SPANS_ROUTES are set.

Field

Salida derivada

NombreExplicaciónTipo de datos
out_feature_class

The updated event feature layer.

Feature Layer

Muestra de código

ModifyLRSEvent example 1 (Python window)

The following script demonstrates how to use the ModifyLRSEvent tool in a Python window for the events to span routes.

# Name: Modify_LRS_Event_ex1.py
# Description: Modify an event registered to a network so that it spans routes.
# Requires: ArcGIS Location Referencing

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

# Tool variables
in_feature_class = "c:/data.gdb/LRS/Event1"
event_id_field = "EventID"
route_id_field = "FromRouteId"
from_date_field = "FromDate"
to_date_field = "ToDate"
loc_error_field = "LocationError"
measure_field = "FromMeasure"
to_measure_field = "ToMeasure"
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"

# Set current workspace
arcpy.env.workspace = "c:/data.gdb"
 
# Execute the tool
arcpy.ModifyLRSEvent_locref(in_feature_class, event_id_field, route_id_field, from_date_field, to_date_field,
                            loc_error_field, measure_field, to_measure_field, event_spans_routes, to_route_id_field,
                            store_route_name, route_name_field, to_route_name_field)

# Check in license
arcpy.CheckInExtension('LocationReferencing')
ModifyLRSEvent example 2 (stand-alone script)

The following script demonstrates how to use the ModifyLRSEvent tool in a stand-alone Python script so that the events span routes.

# Name: Modify_LRS_Event_ex2.py
# Description: Modify an event registered to a network so that it spans routes.
# Requires: ArcGIS Location Referencing

# Import arcpy module
import arcpy

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

# Local variables:
in_feature_class = r"C:/data.gdb/LRS/Event1"
event_id_field = "EventID"
route_id_field = "FromRouteId"
from_date_field = "FromDate"
to_date_field = "ToDate"
loc_error_field = "LocationError"
measure_field = "FromMeasure"
to_measure_field = "ToMeasure"
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"
 
# Process:  Modify LRS Event From Existing Dataset
arcpy.ModifyLRSEvent_locref(in_feature_class, event_id_field, route_id_field, from_date_field, to_date_field,
                            loc_error_field, measure_field, to_measure_field, event_spans_routes, to_route_id_field,
                            store_route_name, route_name_field, to_route_name_field)

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

Entornos

Esta herramienta no utiliza ningún entorno de geoprocesamiento.

Información de licenciamiento

  • Basic: Requiere ArcGIS Location Referencing
  • Standard: Requiere ArcGIS Location Referencing
  • Advanced: Requiere ArcGIS Location Referencing

Temas relacionados