增加最大边数 (Network Analyst)

许可等级:BasicStandardAdvanced

摘要

增加转弯要素类中每个转弯所允许的最大边数。

用法

语法

IncreaseMaximumEdges_na (in_turn_features, maximum_edges)
参数说明数据类型
in_turn_features

要增加最大边数的转弯要素类。

Feature Layer
maximum_edges

输入转弯要素类中新的最大边数。该值至少应比现有最大边数大 1,但不能大于 30。

Long

代码实例

增加最大边数 (IncreaseMaximumEdges) 示例 1(Python 窗口)

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

import arcpy
arcpy.env.workspace = "C:/ArcTutor/Network Analyst/Tutorial/SanFrancisco.gdb"
arcpy.na.IncreaseMaximumEdges("Transportation/RestrictedTurns",8)
增加最大边数 (IncreaseMaximumEdges) 示例 2(独立 Python 脚本)

以下 Python 脚本演示了如何在独立脚本中使用增加最大边数 (IncreaseMaximumEdges) 工具。

# Name: IncreaseMaximumEdges_ex02.py
# Description: Increase maximum edges for turn features from 2 to 5.
# 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/Transportation"

#Set local variables
inTurnFeatures = "RestrictedTurns"
maxEdges = 8

#Increase the edges for turn features
arcpy.na.IncreaseMaximumEdges(inTurnFeatures, maxEdges)

print "Script completed successfully."

环境

相关主题

许可信息

ArcGIS for Desktop Basic:是
ArcGIS for Desktop Standard:是
ArcGIS for Desktop Advanced:是
9/15/2013