Сводка
Modifies properties of a linear referencing system (LRS) event.
Использование
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 type Supports route name Supports 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 type Supports route name Supports 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 type Supports route name Supports 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 type Supports route name Supports spanning routes Line
Yes
No
Line
No
No
Line
Yes
Yes
Line
Yes
No
Point
Yes
N/A
Point
No
N/A
Синтаксис
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})
Parameter | Объяснение | Тип данных |
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 (Дополнительный) | Name of the to measure field. Required only for line events. | Field |
event_spans_routes (Дополнительный) | Determines if the event records will span routes.
| String |
to_route_id_field (Дополнительный) | Name of the to route ID field. Required only if it is a line event and it spans routes. | Field |
store_route_name (Дополнительный) | Determines if the event records will store the route name.
| String |
route_name_field (Дополнительный) | 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 (Дополнительный) | Name of the to route name field. Required if it is a line event, and store_route_name and SPANS_ROUTES are set. | Field |
Производные выходные данные
Name | Объяснение | Тип данных |
out_feature_class | The updated event feature layer. | Feature Layer |
Пример кода
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')
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')
Environments
Информация о лицензиях
- Basic: Требуется ArcGIS Location Referencing
- Standard: Требуется ArcGIS Location Referencing
- Advanced: Требуется ArcGIS Location Referencing