Calculates for each cell the least-accumulative-cost distance, backlink, and allocation over a cost surface to a source cell or a set of source cells.
[Visual Basic .NET] Public Function CostDistanceFull ( _ ByVal sourceData As IGeoDataset, _ ByVal costRaster As IGeoDataset, _ ByVal distance As Boolean, _ ByVal backlink As Boolean, _ ByVal allocation As Boolean, _ [ByRef maxDistance As Object], _ [ByRef valueRaster As Object] _ ) As IGeoDataset
[C#] public IGeoDataset CostDistanceFull ( IGeoDataset sourceData, IGeoDataset costRaster, bool distance, bool backlink, bool allocation, ref object maxDistance, ref object valueRaster );
Optional Values
[C++]
HRESULT CostDistanceFull(
IGeoDataset* sourceData,
IGeoDataset* costRaster,
VARIANT_BOOL distance,
VARIANT_BOOL backlink,
VARIANT_BOOL allocation,
VARIANT* maxDistance,
VARIANT* valueRaster,
IGeoDataset** outData
);
[C++]Parameters
sourceData [in]sourceData is a parameter of type IGeoDataset
costRaster [in]costRaster is a parameter of type IGeoDataset
distance [in] distance is a parameter of type VARIANT_BOOL backlink [in] backlink is a parameter of type VARIANT_BOOL allocation [in] allocation is a parameter of type VARIANT_BOOL maxDistance [optional] maxDistance is a parameter of type VARIANTTo indicate this parameter is undefined pass a reference to a VARIANT with type VT_ERROR and scode value of DISP_E_PARAMNOTFOUND.
valueRaster [optional] valueRaster is a parameter of type VARIANTTo indicate this parameter is undefined pass a reference to a VARIANT with type VT_ERROR and scode value of DISP_E_PARAMNOTFOUND.
outData [out, retval]outData is a parameter of type IGeoDataset
Product Availability
Remarks
sourceData |
an input Raster, RasterDataset, RasterBand, or RasterDescriptor or FeatureClass, FeatureClassDescriptor that identifies those cells or locations to which the least accumulated cost distances for every cell is calculated For Rasters, the input value types can be either integer, string or floating-point type if in_raster_value is used. |
costRaster |
an input Raster, RasterDataset, RasterBand, or RasterDescriptor defining the impedance or cost to move planimetrically through each cell The value at each cell location represents the cost per unit distance for moving through the cell. Each cell location value is multiplied by the cell resolution (while also compensating for diagonal movement) to obtain the total cost of passing through the cell. The values on the costRaster can be integer or floating point, but they cannot be negative (you cannot have a negative cost). |
distance |
a Boolean that if True will create an output Raster that for each cell the least-accumulative-cost distance is calculated over a cost surface, the costRaster, to a source cell or a set of source cells specified in the sourceData |
backlink |
a Boolean that if True will create an output cost back link Raster The back link Raster contains values from 0 through 8, which defines the direction or identifies the next neighboring cell (the succeeding cell) along the least acaccumulative cost path from a cell to reach a source. If the path is to pass into the right neighbor, the cell will be assigned the value '1', '2' for the lower-right diagonal cell and continuing clockwise. The value '0' is reserved for source cells. |
allocation |
a Boolean that if True will create an output cost allocation Raster The cost allocation raster identifies, for each cell, which source would require the least accumulative cost to reach. |
[maxDistance] |
defines the threshold that the accumulative cost values cannot exceed If an accumulative cost distance value exceeds the maxDistance, the output value for the cell location will be NoData. The maxDistance defines the extent which the accumulative cost distances are calculated. If no maxDistance is specified the distance will be to the edge of the output raster. The data type for maxDistance can be either integer or floating point. |
[valueRaster] |
an optional input Raster that identifies the zone values that should be used for each cell on the sourceData The value defined by the valueRaster for each source cell will be assigned to all cells that will be allocated to the source cell in the cost allocation computations. If no valueRaster is specified, the zone value for a source cell is the value on the sourceData. This parameter is particularly important if the sourceRaster was created by the ILogicalOp::Test or a ILogicalOp::Boolean methods that will only output 1 and 0 or if alternative values or zones are to be used instead of the existing ones, on the input source. The data type for the valueRaster can be of type Raster, RasterDataset, RasterBand, or RasterDescriptor. |
- The method returns a reference to a Raster object.
- Read the Working with ArcGIS Spatial Analyst objects technical document for general information on implementing Spatial Analyst operations.