HfInverseLinear

Spatial Analyst のライセンスで利用可能。

サマリー

Defines the relationship between the horizontal cost factor and the horizontal relative moving angle through an inverse linear function. The function specifies that the horizontal factor is an inverse linear function of the horizontal relative moving angle.

HfInverseLinear horizontal factor image
HfInverseLinear horizontal factor for the PathDistance functions.

説明

The HfInverseLinear object is used in the Spatial Analyst tools Path Distance, Path Distance Allocation, and Path Distance Back Link.

The horizontal factors (HF) are determined by the inverse values from a straight line in the horizontal relative moving angle (HRMA)-HF coordinate system. The line intercepts the y-axis, equitable to the HF factor, at the value associated with the zerofactor. The slope of the line can be specified with the slope modifier. If no slope is identified, the default is -2/180 or -1/90 (specified as -0.01111).

構文

 HfInverseLinear ({zeroFactor}, {cutAngle}, {slope})
パラメーター説明データ タイプ
zeroFactor

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

(デフォルト値は次のとおりです 2.0)

Double
cutAngle

The cutAngle establishes the HRMA degree threshold beyond which the HFs are set to infinity.

(デフォルト値は次のとおりです 180.0)

Double
slope

Identifies the slope of the straight line in the HRMA-HF 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 HF on the y axis / 30 degrees on the x axis).

(デフォルト値は次のとおりです -0.011111)

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
cutAngle
(読み書き)

The cutAngle establishes the HRMA degree threshold beyond which the HFs are set to infinity.

When the HRMA is less than the cut angle then the zero factor is assigned and when the HRMA is greater than the cut angle, infinity is assigned.

Double
slope
(読み書き)

Identifies the slope of the straight line in the HRMA-HF 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 HF on the y axis / 30 degrees on the x axis).

Double

コードのサンプル

HfInverseLinear example 1 (Python window)

Demonstrates how to create an HFInverseLinear class and use it in the PathDistance tool within the Python window.

import arcpy
from arcpy import env
from arcpy.sa import *
env.workspace = "C:/sapyexamples/data"
myHorizFactor = HfInverseLinear(2.0, 181.0, -0.01111)
outPathDist = PathDistance("source.shp", "costraster", "", "", myHorizFactor)
outPathDist.save("C:/sapyexamples/output/pathdisthfil")
HfInverseLinear example 2 (stand-alone script)

Performs a PathDistance analysis using the HFInverseLinear class.

# Name: HfInverseLinear_Ex_02.py
# Description: Uses the HfInverseLinear 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 HfInverseLinear Object
zeroFactor = 2.0
cutAngle = 181.0
slope = -0.01111
myHorizFactor = HfInverseLinear(zeroFactor, cutAngle, slope)

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

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

関連トピック