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.
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.
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. |
ETSPath used in the table below is the full path to ETSRun.exe (E.G. "C:\Program Files\ETSpatial Techniques\ETSurface\ETSRun.exe")
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: