ジオメトリによる更新(Update by Geometry) (Network Analyst)

サマリ

ターン フィーチャのジオメトリを使用して、ターン フィーチャクラス内のすべてのエッジ参照を更新します。このツールは、元のエッジが編集されたため、ターンについて指定されている ID によってターンで使用されているエッジを検索できなくなった場合に便利です。

使用法

構文

UpdateByGeometry_na (in_turn_features)
パラメータ説明データ タイプ
in_turn_features

更新されるターン フィーチャクラス。

Feature Layer

コードのサンプル

UpdateByGeometry(ジオメトリによる更新)の例 1(Python ウィンドウ)

すべてのパラメータを使用してツールを実行します。

import arcpy
arcpy.env.workspace = "C:/ArcTutor/Network Analyst/Tutorial/SanFrancisco.gdb"
arcpy.UpdateByGeometry_na("Transportation/RestrictedTurns")
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
inTurnFeatures = "RestrictedTurns"
inNetworkDataset = "Transportation/Streets_ND"

#update the edge references in turn features using the geometry
arcpy.UpdateByGeometry_na(inTurnFeatures)

#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.BuildNetwork_na(inNetworkDataset)

print "Script completed successfully."

環境

関連項目


7/10/2012