VfSymInverseLinear (arcpy.sa)

摘要

通过垂直相对移动角度 (VRMA) 负侧或正侧的对称逆线性函数确定垂直成本系数和 VRMA 之间的关系。这两个线性函数关于 VF (y) 轴对称。

插图

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

讨论

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

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

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

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

顾名思义,VfSymInverseLinear 类与 VfSymLinear 垂直系数类正相反。它由两个与 VRMA 相关的线性函数组成,这两个函数关于 VF (y) 轴相对称。两条线都在零系数处截取 y 轴。使用斜率垂直系数参数针对正 VRMA 定义线的斜率,然后将针对负 VRMA 生成一个镜像。

语法

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

The zeroFactor will be used to position the y-intercept of the symmetric inverse linear function.

(默认值为 1.0)

Double
lowCutAngle

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

(默认值为 -45.0)

Double
highCutAngle

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

(默认值为 45.0)

Double
slope

Identifies the slope of the straight line in the VRMA-VF coordinate system. Slope is specified as the rise/run. For example, a 30-degree slope is 1/30, specified as 0.03333 (rise/run: 1 VF on the y axis / 30 degrees on the x axis); a -45-degree slope as -0.022222.

(默认值为 -0.022222)

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
slope
(读写)

Identifies the slope of the straight line in the VRMA-VF coordinate system. Slope is specified as the rise over the run. For example, a 30-degree slope is 1/30, specified as 0.03333 (rise/run: 1 VF on the y axis / 30 degrees on the x axis); a 90-degree slope as 0.011111.

Double

代码实例

VfSymInverseLinear 示例 1(Python 窗口)

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

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

使用 VfSymInverseLinear 类执行 PathDistance 分析。

# Name: VfInverseLinear_Ex_02.py
# Description: Uses the VfInverseLinear 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 VfInverseLinear Object
zeroFactor = 1.0
lowCutAngle = -45
highCutAngle = 45
slope = -0.02222
myVerticalFactor = VfInverseLinear(zeroFactor, lowCutAngle, highCutAngle,
                                    slope)

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

相关主题

5/10/2014