Calculates distance, or weighted distance along a flow path.
[Visual Basic .NET] Public Function FlowLength ( _ ByVal directionRaster As IGeoDataset, _ ByVal downStream As Boolean, _ [ByRef weightRaster As Object] _ ) As IGeoDataset
[C#] public IGeoDataset FlowLength ( IGeoDataset directionRaster, bool downStream, ref object weightRaster );
Optional Values
[C++]
HRESULT FlowLength(
IGeoDataset* directionRaster,
VARIANT_BOOL downStream,
VARIANT* weightRaster,
IGeoDataset** FlowLength
);
[C++]Parameters
directionRaster [in]directionRaster is a parameter of type IGeoDataset
downStream [in] downStream is a parameter of type VARIANT_BOOL weightRaster [optional] weightRaster 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.
FlowLength [out, retval]FlowLength is a parameter of type IGeoDataset
Product Availability
Remarks
directionRaster | raster indicating direction of flow
This grid is created using the IHydrologyOp::FlowDirection method. |
downStream | a Boolean indicating the direction of
measurement along the flow path
If True, then the method calculates the downslope distance, along the flow path, from each cell to a sink or outlet on the edge of the raster. If False, the method calculates the longest upslope distance along the flow path, from each cell to the top of the drainage divide. |
[weightRaster] | a raster defining the impedance or
resistance to move through each cell
The value at each cell location represents the cost per unit distance of moving through the cell. Each cell location value is multiplied by the cell resolution to obtain the total cost of passing through the cell. The data type for the weightRaster can be any Raster object that supports IGeoDataset (e.g., Raster, Raster band, etc.). |
- 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.