VfBinary (arcpy.sa)

摘要

通过二元函数定义垂直成本系数和垂直相对移动角度之间的关系。如果垂直相对移动角度大于交角下限且小于交角上限,则将垂直系数设置为与零系数相关联的值;否则为无穷大。

插图

VfBinary 垂直系数图像
路径距离功能的 VfBinary 垂直系数。

讨论

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

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

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

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

当 VRMA 大于交角上限且小于交角下限时,将在两个像元之间移动的 VF 设置为与零系数相关联的值。如果 VRMA 大于交角上限或小于交角下限,则将 VF 设置为无穷大。

语法

VfBinary ({zeroFactor}, {lowCutAngle}, {highCutAngle})
参数说明数据类型
zeroFactor

The zeroFactor will be used to position the y-intercept of the binary function.

(默认值为 1.0)

Double
lowCutAngle

The VRMA degree defining the lower threshold, below which (less than) the VFs are set to infinity.

(默认值为 -30.0)

Double
highCutAngle

The VRMA degree defining the upper threshold, beyond which (larger than) the VFs are set to infinity.

(默认值为 30.0)

Double

属性

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

The zeroFactor is used to position the y-intercept for the vertical factor class.

Double
lowCutAngle
(读写)

The VRMA degree defining the lower threshold, below which (less than) the VFs are set to infinity.

Double
highCutAngle
(读写)

The VRMA degree defining the upper threshold, beyond which (larger than) the VFs are set to infinity.

Double

代码实例

VfBinary 示例 1(Python 窗口)

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

import arcpy
from arcpy import env
from arcpy.sa import *
env.workspace = "C:/sapyexamples/data"
myVerticalFactor = VfBinary(1.0, -30, 30)
outPathDist = PathDistance("source.shp", "costraster", "", "", "", "",
                           myVerticalFactor)
outPathDist.save("C:/sapyexamples/output/pathdistvfb")
VfBinary 示例 2(独立脚本)

使用 VfBinary 类执行 PathDistance 分析。

# Name: VfBinary_Ex_02.py
# Description: Uses the VfBinary 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 VfBinary Object
zeroFactor = 1.0
lowCutAngle = -30
highCutAngle = 30
myVerticalFactor = VfBinary(zeroFactor, lowCutAngle, highCutAngle)

# 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/pathdistvfb2")

相关主题

9/15/2013