# HfForward (arcpy.sa)

## 插图

 路径距离功能的 HfForward 水平系数。

## 讨论

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

## 语法

HfForward ({zeroFactor}, {sideValue})
 参数 说明 数据类型 zeroFactor The zeroFactor will be used to position the y-intercept of the forward function. (默认值为 0.5) Double sideValue Identifies the HF value that will be assigned for HRMAs that are equal to or less than 45 degrees and less than 90 degrees. In the diagram above, the sideValue is assigned 1. (默认值为 1.0) Double

## 属性

 属性 说明 数据类型 zeroFactor(读写) The zeroFactor will be used to position the y-intercept of the function. The zeroFactor is assigned as the horizontal factor when HRMA is less then the cut angle. Double sideValue(读写) Identifies the HF value that will be assigned for HRMAs that are equal to or less than 45 degrees and less than 90 degrees. In the diagram above the sideValue is assigned 1. Double

## 代码实例

HfForward 示例 1（Python 窗口）

import arcpy
from arcpy import env
from arcpy.sa import *
env.workspace = "C:/sapyexamples/data"
myHorizFactor = HfForward(0.5, 1.0)
outPathDist = PathDistance("sourcepts.shp", "costraster", "", "", myHorizFactor)
outPathDist.save("C:/sapyexamples/output/pathdisthff")
HfForward 示例 2（独立脚本）

# Name: HfForward_Ex_02.py
# Description: Uses the HfForward 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 = "sourcepts.shp"
inCostRaster = "costraster"

# Create the HfForward Object
zeroFactor = 0.5
sideValue = 1.0
myHorizFactor = HfForward(zeroFactor, sideValue)

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

# Execute PathDistance
outPathDist = PathDistance(inSourceData, inCostRaster, "", "", myHorizFactor)

# Save the output
outPathDist.save("C:/sapyexamples/output/pathdisthff2")

5/10/2014