Cost Distance - Costs from Raster

Running programmatically

Calculates for each cell of the output raster the least cost to reach one of the sources of the input feature class. The cost is calculated as distance from the cell to the source multiplied by the weight of the cells of the cost raster. The NODATA values in the cost raster are considered prohibitive cost.

The performance of the function depends very much on the difference between the smallest and largest weights. The larger this difference is, the slower the function will be.

Inputs:

Outputs:

Example:

Source points. Cost Raster - Slope raster of digital terrain model used in the example.

The result of the Cost Distance function.

The result of the Cost Distance function over the zones derived with the Cost Allocation function.

Notes:

Running Programmatically

(Go to TOP)

Parameters

Expression Explanation
Function Name CostDistanceRaster
<InputFeatures> A String - the full path to the input feature dataset.
<output raster> A String - the full name of the output raster.
<CostRaster> A String representing the cost raster dataset.
<CutOff> A Double representing the cut off cost - the value of the cells with larger than this cost (distance x weight) to reach will be set to NODATA.

Running the function

ETSPath used in the table below is the full path to ETSRun.exe (E.G. "C:\Program Files\ETSpatial Techniques\ETSurface\ETSRun.exe")

CostRaster
Language Syntax
Python subprocess.call([ETSPath, "CostDistanceRaster", "InputFeatures", "output raster", "CostRaster", "CutOff"])
.NET using ETSRun.exe StartInfo.FileName = ETSPath
StartInfo.Arguments = "CostDistanceRaster" "InputFeatures" "output raster" "CostRaster" "CutOff"
.NET using ETSOutX.dll CostDistanceRaster(InputFeatures, output raster, CostRaster, CutOff)
ArcPy arcpy.CostDistanceRaster("InputFeatures", "output raster", "CostRaster", "CutOff")

Notes:

(Go to TOP)