VfCos (arcpy.sa)

插图

 路径距离功能的 VfCos 垂直系数。

讨论

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

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

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

VF 由 VRMA 的余弦函数确定。

语法

VfCos ({lowCutAngle}, highCutAngle, {cosPower})
 参数 说明 数据类型 lowCutAngle The VRMA degree defining the lower threshold, below which (less than) the VFs are set to infinity. (默认值为 -90.0) Double highCutAngle The VRMA degree defining the upper threshold, beyond which (larger than) the VFs are set to infinity. (默认值为 90.0) Double cosPower The power to which the values in the cosine VRMA function will be raised. The VF is determined by: ` VF = cos(VRMA)power` (默认值为 1.0) 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 cosPower(读写) The power to which the values in the cosine VRMA function will be raised. The VF is determined by: ` VF = cos(VRMA)power` Double

代码实例

VfCos 示例 1（Python 窗口）

``````import arcpy
from arcpy import env
from arcpy.sa import *
env.workspace = "C:/sapyexamples/data"
myVerticalFactor = VfCos(-15, 15, 1.5)
outPathDist = PathDistance("source.shp", "costraster", "", "", "", "",
myVerticalFactor)
outPathDist.save("C:/sapyexamples/output/pathdistvfc")
``````
VfCos 示例 2（独立脚本）

``````# Name: VfCos_Ex_02.py
# Description: Uses the VfCos 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 VfCos Object
lowCutAngle = -15
highCutAngle = 45
cosPower = 2
myVerticalFactor = VfCos(lowCutAngle, highCutAngle, cosPower)

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

5/10/2014