VfTable (arcpy.sa)

摘要

使用垂直系数图定义垂直成本系数和垂直相对移动角度之间的关系,此垂直系数图确定表文件指定的垂直系数。

讨论

VfTable 对象用于 Spatial Analyst 工具路径距离路径距离分配路径距离回溯链接

垂直系数 (VF) 对象用于定义垂直成本系数和垂直相对移动角度 (VRMA) 之间的关系。

VF 用于定义从一个像元移至下一像元的垂直阻力。

VRMA 用于确定“起始”像元或处理像元与“终止”像元之间的坡度角。

语法

VfTable (inTable)
参数说明数据类型
inTable

The inTable is an ASCII file with two columns on each line. The first column identifies the VRMA in degrees, and the second, the VF. Each line specifies a point. Two consecutive points produce a line segment in the VRMA-VF coordinate system.

The VRMAs must be input in ascending order. The VF factor for any VRMA less than the first (lowest) input value or larger than the final (largest) input will be set to infinity. An infinite VF is represented by -1 in the ASCII table.

File

属性

属性说明数据类型
inTable
(读写)

The inTable is an ASCII file with two columns on each line. The first column identifies the VRMA in degrees, and the second, the VF. Each line specifies a point. Two consecutive points produce a line segment in the VRMA-VF coordinate system.

The VRMAs must be input in ascending order. The VF factor for any VRMA less than the first (lowest) input value or larger than the final (largest) input will be set to infinity. An infinite VF is represented by -1 in the ASCII table.

String

代码实例

VfTable 示例 1(Python 窗口)

演示如何创建 VfTable 类以及如何在 Python 窗口的 PathDistance 工具中使用该类。

import arcpy
from arcpy import env
from arcpy.sa import *
env.workspace = "C:/sapyexamples/data"
myVerticalFactor = VfTable("vffile.txt")
outPathDist = PathDistance("source.shp", "costraster", "", "", "", "",
                           myVerticalFactor)
outPathDist.save("C:/sapyexamples/output/pathdistvft")
VfTable 示例 2(独立脚本)

使用 VfTable 类执行 PathDistance 分析。

# Name: VfTable_Ex_02.py
# Description: Uses the VfTable object to execute the PathDistance tool.
# Requirements: Spatial Analyst Extension

# Import system modules
import arcpy
from arcpy import env
from arcpy.sa import *

# Set environment settings
env.workspace = "C:/sapyexamples/data"

# Set local variables
inSourceData = "source.shp"
inCostRaster = "costraster"

# Create the VfTable Object
inTable = "vffile.txt"
myVerticalFactor = VfTable(inTable)

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

# Execute PathDistance
outPathDist = PathDistance(inSourceData, inCostRaster, "", "", "", "",
                           myVerticalFactor)

# Save the output 
outPathDist.save("C:/sapyexamples/output/pathdistvft2")

相关主题

9/15/2013