raster_tools.distance.cda_cost_distance#
- raster_tools.distance.cda_cost_distance(costs, sources, elevation=None)[source]#
- Calculate just the cost distance for a cost surface - See cost_distance_analysis for a full description. - Parameters
- costs (Raster or raster path) – A raster representing a cost surface. Values less than 0 are treated as null values. 
- sources (Raster or raster path, or sequence) – A raster or sequence of indices. If a raster, pixels that are not null are used as source locations. The raster must have a null value set. The values at valid locations are used as the corresponding values in the allocation output. If a sequence, must have shape (M, 2) where M is the number of source pixels. Each item represents an index into costs to be used as a source. The element number, starting at 0, is used as the corresponding allocation value. 
- elevation (Raster or raster path, optional) – A raster containing elevation values on the same grid as costs. If provided, the elevation values are used when calculating the travel distance between pixels. This makes the algorithm 3D aware. 
 
- Returns
- cost_distance – The accumulated cost distance solution. This is the same shape as the costs input Raster. 
- Return type
- Raster 
 - See also - cost_distance_analysis
- Full cost distance solution