描述
Builds calibration point features when an advanced linear referencing system already exists in the geodatabase.
使用方法
Input Polyline Features is used as a source linear referencing method for calculating the measure values to update the calibration point feature class.
The Measure Tolerance parameter is only used when you choose to update measures on existing calibration points.
If the existing measure lies within the tolerance of the calculated measure, the measure on the calibration point will not be updated.
语法
arcpy.locref.UpdateCalibrationPoints(in_polyline_features, in_routeid_field, in_calibration_point_features, in_lrs, in_network, in_calculation_method, in_update_method, in_search_tolerance, in_measure_tolerance, {in_from_date_field}, {in_to_date_field}, {in_from_measure_field}, {in_to_measure_field}, {in_source_unit_of_measure}, {in_calibration_direction}, {in_gap_calibration_type}, {in_gap_measure_increment})
参数 | 说明 | 数据类型 |
in_polyline_features | The Input Polyline Features that will be used as the source to calculate the measure values for the calibration points. | Feature Layer |
in_routeid_field | The field containing values that uniquely identify each route. Long, Short, Text, GUID, and GlobalID field types are supported. | Field |
in_calibration_point_features | The calibration point feature class in which new features will be added and existing features will be updated. | Feature Layer |
in_lrs | The advanced linear referencing system with which the calibration point feature class is associated. | String |
in_network | The LRS Network layer for which the measure values need to be generated and updated in the calibration points feature class. | String |
in_calculation_method | The method used to calculate measure value for calibration points being updated.
| String |
in_update_method | This method determines which calibration point features get updated.
| String |
in_search_tolerance | New calibration points will not be created at the end point of a route if another calibration point already exists within the Search Tolerance. | Double |
in_measure_tolerance | All existing calibration points that fall within this measure tolerance will not have their measure values updated. | Double |
in_from_date_field (可选) | The field containing the From Date values of a route. | Field |
in_to_date_field (可选) | The field containing the To Date values of a route. | Field |
in_from_measure_field (可选) | The field containing the From Measure of a route. This parameter becomes active if the Calculation Method parameter is set to ATTRIBUTE_FIELDS_2D or ATTRIBUTE_FIELDS_3D. | String |
in_to_measure_field (可选) | The field containing the To Measure of a route. This parameter becomes active if the Calculation Method parameter is set to ATTRIBUTE_FIELDS_2D or ATTRIBUTE_FIELDS_3D. | String |
in_source_unit_of_measure (可选) | The source unit of measure of the input polyline features. This parameter becomes active if the Calculation Method parameter is set to M_ON_ROUTE_2D or M_ON_ROUTE_3D. | String |
in_calibration_direction (可选) | Determines the direction of calibration for calibration points based on the input route features. This parameter becomes active if the Calculation Method parameter is set to GEOMETRY_LENGTH_2D or GEOMETRY_LENGTH_3D.
| String |
in_gap_calibration_type (可选) | Determines the method for calibrating physically gapped routes based on the input route features. This parameter becomes active if the Calculation Method parameter is set to GEOMETRY_LENGTH_2D or GEOMETRY_LENGTH_3D.
| String |
in_gap_measure_increment (可选) | Determines the value that is added to the calibration of the endpoints of a physically gapped route. This parameter is required if the Gap Calibration Type parameter is set to STEPPING_INCREMENT or ADDING_INCREMENT. | Double |
代码示例
UpdateCalibrationPoints example 1 (Python window)
The following Python window script demonstrates how to use the UpdateCalibrationPoints function in immediate mode.
# tool variables
in_polyline_features = "network"
in_routeid_field = "ROUTE_ID"
in_calibration_point_features = "Calibration_Point"
in_lrs = "NY_ALRS"
in_network = "MilePoint"
in_calculation_method = "M_ON_ROUTE_2D"
in_update_method = "UPDATE_ALL_EXISTING_CALIBRATION_POINTS"
in_search_tolerance = "0.0001"
in_measure_tolerance = "0.0001"
in_from_date_field = "From_Date"
in_to_date_field = "To_Date"
in_frommeasure = ""
in_tomeasure = ""
in_source_unit_of_measure = "Miles"
in_calibration_direction = ""
in_gap_calibration = ""
in_gap_measure = ""
# set current workspace
arcpy.env.workspace = "C:/Data/NYData.gdb"
# execute the tool
arcpy.UpdateCalibrationPoints_locref(in_polyline_features, in_routeid_field, in_calibration_point_features, in_lrs, in_network, in_calculation_method, in_update_method, in_search_tolerance, in_measure_tolerance, in_from_date_field, in_to_date_field, in_frommeasure, in_tomeasure, in_source_unit_of_measure, in_calibration_direction, in_gap_calibration, in_gap_measure)
UpdateCalibrationPoints example 2 (stand-alone script)
The following stand-alone script demonstrates how to use the UpdateCalibrationPoints function in stand-alone mode.
# Name: GenerateCalibrationPoints.py
# Description: Update the existing calibration points feature class using the polylineMZ as input.
# Import arcpy module
import arcpy
# Check out any necessary licenses
arcpy.CheckOutExtension("Highways")
# Local variables
network = "C:/Data/NYData.gdb/LRSN_MilePoint"
calibration_point = "C:/Data/NYData.gdb/Calibration_Point"
# Process: Make Feature Layer
arcpy.MakeFeatureLayer_management(network, "network_lyr")
arcpy.MakeFeatureLayer_management(calibration_point, "calibration_point_lyr")
# Process: Update Calibration Points
arcpy.UpdateCalibrationPoints_locref("network_lyr", "ROUTE_ID", "FromDate", "ToDate", "calibration_point_lyr", "NY_ALRS", "MilePoint", "GEOMETRY_LENGTH_3D", "UPDATE_END_CALIBRATION_POINTS_ONLY", "0.0001", "0.0001", "", "", "", "MEASURE_DIRECTION", "ADDING_INCREMENT", "0.01")
环境
许可信息
- Basic: 需要 Roads and Highways
- Standard: 需要 Roads and Highways
- Advanced: 需要 Roads and Highways