# VfHikingTime

## 说明

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

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

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

VfHikingTime 的公式（即托布勒徒步旅行函数的倒数）如下所示：

##### 注：

• Tobler, Waldo. 1993. 地理分析与模型三篇论文：非各向同性地理建模；地理学的几何特征的猜测；全球空间分析 (93-1)。 检索自 https://escholarship.org/uc/item/05r820mz

## 语法

`VfHikingTime ({lowCutAngle}, {highCutAngle})`
 参数 说明 数据类型 lowCutAngle The VRMA degree defining the lower threshold, below which (less than) the VFs are set to infinity.(默认值为 -70.0) Double highCutAngle The VRMA degree defining the upper threshold, beyond which (larger than) the VFs are set to infinity.(默认值为 70.0) Double

## 属性

 属性 说明 数据类型 lowCutAngle(可读写) 用于定义阈值下限的 VRMA 度数，如果低于（小于）该值，则将 VF 设置为无穷大。 Double highCutAngle(可读写) 用于定义阈值上限的 VRMA 度数，如果高于（大于）该值，则将 VF 设置为无穷大。 Double

## 代码示例

VfHikingTime 示例 1（Python 窗口）

``````import arcpy
from arcpy import env
from arcpy.sa import *
env.workspace = "C:/sapyexamples/data"
myVerticalFactor = VfHikingTime(-30, 30)
outDistAccum = DistanceAccumulation("Source.shp", "", "elev.tif",
"cost.tif", "elev.tif",
myVerticalFactor)
outDistAccum.save("C:/sapyexamples/output/distAccumVfH.tif")``````
VfHikingTime 示例 2（独立脚本）

``````# Name: VfHikingTime_Ex_02.py
# Description: Uses the VfHikingTime 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 VfHikingTime Object
lowCutAngle = -30
highCutAngle = 30
myVerticalFactor = VfHikingTime(lowCutAngle, highCutAngle)

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

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

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