This document is archived and information here might be outdated.  Recommended version.


IHydrologyOp.FlowLength Method (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (SpatialAnalyst)  

IHydrologyOp.FlowLength Method

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
);
[C#]

Optional Values

weightRaster   To indicate that this parameter is undefined, first define a variable object Missing=Type.Missing; then pass this in as ref Missing.
[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 VARIANT
To 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

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires Spatial Analyst Extension.

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.).

 

See Also

IHydrologyOp Interface