ArcGIS for Desktop

  • 文档
  • 合约
  • 支持

  • My Profile
  • 帮助
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

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

ArcGIS for Desktop

全面的专业性 GIS

ArcGIS for Server

面向企业的 GIS

ArcGIS for Developers

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

ArcGIS Solutions

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

ArcGIS Marketplace

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

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

帮助

  • 主页
  • 入门
  • 制图
  • 分析
  • 管理数据
  • 工具
  • 更多...

按几何更新

需要 Network Analyst 许可。

  • 摘要
  • 用法
  • 语法
  • 代码实例
  • 环境
  • 许可信息

摘要

使用转弯要素的几何更新转弯要素类中的所有边引用。如果对基础边所做的编辑导致根据列出的转弯 ID 再也无法找到参与转弯的边,则此工具会很有用。

用法

  • 该工具将根据来自网络源的转弯要素与边要素之间的重叠,来更新转弯要素类的 Edge#FID 字段值。

  • 更新转弯要素时遇到的错误将记录在被写入到 TEMP 系统变量所定义的目录的错误文件中。错误文件的完整路径名将作为警告消息显示。

语法

UpdateByGeometry_na (in_turn_features)
参数说明数据类型
in_turn_features

要更新的转弯要素类。

Feature Layer

代码实例

按几何更新 (UpdateByGeometry) 示例 1(Python 窗口)

使用所有参数执行此工具。

turns = "C:/Data/SanFrancisco.gdb/Transportation/RestrictedTurns"
arcpy.na.UpdateByGeometry(turns)
按几何更新 (UpdateByGeometry) 示例 2(独立 Python 脚本)

以下 Python 脚本演示了如何在独立脚本中使用按几何更新 (UpdateByGeometry) 工具。

# Name: UpdateByGeometry_ex02.py
# Description: Update edge references in the turn feature class using the
#              geometry of turn features and re-build the network dataset.
# Requirements: Network Analyst Extension 

#Import system modules
import arcpy
from arcpy import env

#Check out the Network Analyst extension license
arcpy.CheckOutExtension("Network")

#Set environment settings
env.workspace = "C:/Data/SanFrancisco.gdb"

#Set local variables
turn_features = "RestrictedTurns"
network = "Transportation/Streets_ND"

#Update the edge references in turn features using the geometry
arcpy.na.UpdateByGeometry(turn_features)

#Since we have modified the edge references for turn sources, we should rebuild 
#the network dataset so that the turn features are correctly interpreted by the 
#network dataset
arcpy.na.BuildNetwork(network)

print("Script completed successfully.")

环境

  • 当前工作空间

许可信息

  • ArcGIS for Desktop Basic: 是
  • ArcGIS for Desktop Standard: 是
  • ArcGIS for Desktop Advanced: 是

相关主题

  • 影响转弯的其他编辑操作
  • 转弯要素类工具集概述
有关此主题的反馈?

ArcGIS for Desktop

  • 主页
  • 文档
  • 合约
  • 支持

ArcGIS 平台

  • ArcGIS Online
  • ArcGIS for Desktop
  • ArcGIS for Server
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

关于 Esri

  • 关于我们
  • 招贤纳士
  • 内部人员博客
  • 用户大会
  • 开发者峰会
Esri
© Copyright 2016 Environmental Systems Research Institute, Inc. | 隐私政策 | 法律声明