ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • 帮助
  • Sign Out
ArcGIS Desktop

ArcGIS Online

专为贵组织打造的制图平台

ArcGIS Desktop

全面的专业性 GIS

ArcGIS Enterprise

面向企业的 GIS

ArcGIS Developers

用于构建位置感知应用程序的工具

ArcGIS Solutions

适用于行业的免费模板地图和应用程序

ArcGIS Marketplace

获取适用于组织的应用程序和数据

  • 文档
  • 支持
Esri
  • 登录
user
  • 我的个人资料
  • 登出

ArcMap

  • 主页
  • 入门
  • 地图
  • 分析
  • 管理数据
  • 工具
  • 扩展模块

Translate Events From LRM To LRM

  • 描述
  • 使用方法
  • 语法
  • 代码示例
  • 环境
  • 许可信息

描述

Translates the measures (m-values) of events from one linear referencing method (LRM) to another. The output is a new event layer feature class.

This tool helps bring together event data provided by various business units that may use a different LRM. These LRMs may have different route IDs and m-values that require translation between LRMs.

旧版本:

This tool is scheduled to be deprecated at the next release. It will be replaced by a similar geoprocessing tool at that time.

使用方法

  • This tool accepts both feature classes and feature layers but works best with feature layers. To use feature layers, the source event and target LRM Network should be added to the map document in ArcMap.

  • This tool only supports translating a one-time view of a network when using feature layers.

  • The output event type (LINE or POINT) must match the source event type. The tolerance and resolution settings for the source event feature class should match those of the target network feature class.

  • This tool adds a field named Loc_Error to the output file. The Location Error attributes for this field include Multi-Match, Partial Match, No Match, and No Error.

    This tool also adds three fields with the prefix src_ to the output file. The first field will contain the source route ID selected in the table properties (such as src_route ID). The second field will contain the source From Measure selected in the table properties (such as src_FromMeasure). The third field will contain the source ToMeasure selected in the table properties (such as src_ToMeasure).

语法

arcpy.locref.TranslateEventsFromLRMToLRM(in_source_event_layer, in_event_table_properties, in_target_network, in_route_id_field, in_concurrent_route_matching, out_target_event_layer)
参数说明数据类型
in_source_event_layer

The source event layer to be translated.

Feature Layer
in_event_table_properties

Specifies the route identifier field, the geometry type, and the measures in the input event table.

  • Route Identifier Field—The field in the source event table that contains the route IDs for each event.
  • Event Type—The source event type (LINE or POINT).
    • LINE—Uses both From and To measure values to describe a portion of a route.
    • POINT—Uses only a single measure value to describe a discrete location. Only a From Measure field must be specified for point events.
  • From-Measure Field—A field containing From Measure values for line events. When the Event Type is POINT, the label for this parameter becomes Measure field.
  • To-Measure Field—A field containing To Measure values for line events.
Route Measure Event Properties
in_target_network

The route network to which the source events will be translated.

Feature Layer
in_route_id_field

The field in the target network layer that contains the unique route IDs for each route.

String
in_concurrent_route_matching

Specifies the route to which the event will be translated when concurrent routes exist in the target network. The selected method is only applied when the location of the event translation in the target network has concurrent routes.

  • ANY —The source event is translated to the first of the concurrent routes at the source event location in the target network.
  • ROUTE_ID —The route ID of the source event is compared to the route IDs of concurrent routes at the source event location in the target network. The source event will translate based on matching route IDs in the source event and target network. The route IDs of the source event and target network must be an exact match to correctly translate the event.
  • ALL —The source event is translated to all the concurrent routes at that location in the target network.
String
out_target_event_layer

The translated event to be created.

Feature Layer

代码示例

TranslateEventsFromLRMToLRM example 1 (Python window)

Use the TranslateEventsFromLRMToLRM tool in ArcMap.

#tool variables
in_source_event_layer = "Pavement Type"
in_event_table_properties = "ROUTE_ID LINE FROM_MEASURE TO_MEASURE"
in_target_network = "MileMarker"
in_route_id_field = "CustomRouteField"
out_target_event_layer = "Pavement_Type_MileMarker"

# set current workspace
arcpy.env.workspace = "C:/Data/NY_Data.gdb"

# execute the tool
arcpy.TranslateEventsFromLRMToLRM_locref(in_source_event_layer, in_event_table_properties, in_target_network, in_route_id_field, out_target_event_layer)
TranslateEventsFromLRMToLRM example 2 (stand-alone Python script)

Use the TranslateEventsFromLRMToLRM tool in a Python script.

# Name: TranslateEventsFromLRMtoLRM.py
# Description: Translate Event from one LRM to another LRM. 

# Import arcpy module
import arcpy

# Check out any necessary licenses
arcpy.CheckOutExtension("Highways")

# Local variables:
event = "C:/Data/NY_Data.gdb/LRSE_Pavement_Type"
network = "C:/Data/NY_Data.gdb/LRSN_MileMarker"
out_event = "C:/Data/NY_Data.gdb/Pavement_Type_MMarker"
event_Table_Properties = "ROUTE_ID LINE FROM_MEASURE TO_MEASURE"

# Process: Make Feature Layer
arcpy.MakeFeatureLayer_management(event, "event_lyr")
arcpy.MakeFeatureLayer_management(network, "network_lyr")

# Process: Translate Events From LRM To LRM
arcpy.TranslateEventsFromLRMToLRM_locref("event_lyr", event_Table_Properties, "network_lyr", "Route_ID", out_event)

环境

  • 当前工作空间

许可信息

  • Basic: 需要 Roads and Highways
  • Standard: 需要 Roads and Highways
  • Advanced: 需要 Roads and Highways

相关主题

  • An overview of the Location Referencing toolbox

ArcGIS Desktop

  • 主页
  • 文档
  • 支持

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

关于 Esri

  • 关于我们
  • 招贤纳士
  • Esri 博客
  • 用户大会
  • 开发者峰会
Esri
分享您的想法。
Copyright © 2021 Esri. | 隐私政策 | 法律声明