VfSec

需要 Spatial Analyst 许可。

摘要

通过正割函数定义垂直成本系数和垂直相对移动角度之间的关系。

插图

VfSec 垂直系数图
正割垂直系数图。

说明

此对象用于距离累积距离分配 Spatial Analyst 工具,以及路径距离路径距离分配路径距离回溯链接旧的距离工具。

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

VF 定义从一个像元移至下一像元时所遇到的垂直阻力。

VRMA 标识“起始”像元或处理像元与“终止”像元之间的坡度角度。

VF 由 VRMA 的正割函数确定。

语法

VfSec ({lowCutAngle}, {highCutAngle}, {secPower})
参数说明数据类型
lowCutAngle

用于定义阈值下限的 VRMA 度数,如果低于(小于)该值,则将 VF 设置为无穷大。

(默认值为 -90.0)

Double
highCutAngle

用于定义阈值上限的 VRMA 度数,如果高于(大于)该值,则将 VF 设置为无穷大。

(默认值为 90.0)

Double
secPower

VRMA 的正割函数中的值将增加到的幂。VF 由以下方程确定:

 VF = sec(VRMA)power

(默认值为 1.0)

Double

属性

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

用于定义阈值下限的 VRMA 度数,如果低于(小于)该值,则将 VF 设置为无穷大。

Double
highCutAngle
(可读写)

用于定义阈值上限的 VRMA 度数,如果高于(大于)该值,则将 VF 设置为无穷大。

Double
secPower
(可读写)

VRMA 的正割函数中的值将增加到的幂。VF 由以下方程确定:

 VF = sec(VRMA)power

Double

代码示例

VfSec 示例 1(Python 窗口)

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

import arcpy
from arcpy import env
from arcpy.sa import *
env.workspace = "C:/sapyexamples/data"
myVerticalFactor = VfSec(-90, 90, 1)
outDistAccum = DistanceAccumulation("Source.shp", "", "elev.tif",
                                   "cost.tif", "elev.tif",
                                    myVerticalFactor)
outDistAccum.save("C:/sapyexamples/output/distAccumVfS.tif")
VfSec 示例 2(独立脚本)

使用 VfSec 类执行 DistanceAccumulation 分析。

# Name: VfSec_Ex_02.py
# Description: Uses the VfSec object to run the 
#              DistanceAccumulation 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.tif"
inElevation = "elev.tif"

# Create the VfSec Object
lowCutAngle = -90
highCutAngle = 90
secPower = 1
myVerticalFactor = VfSec(lowCutAngle, highCutAngle, secPower)

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

# Execute PathDistance
outDistAccum = DistanceAccumulation(inSourceData, "", inElevation,
                                    inCostRaster, inElevation,
                                    myVerticalFactor)

# Save the output 
outDistAccum.save("C:/sapyexamples/output/distaccumvfS2.tif")

相关主题