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


IHydrologyOp2.Watershed Method (ArcObjects .NET 10.6 SDK)
ArcObjects Library Reference (SpatialAnalyst)  

IHydrologyOp2.Watershed Method

Determines the contributing area above a set of cells in a raster.

[Visual Basic .NET]
Public Function Watershed ( _
    ByVal directionRaster As IGeoDataset, _
    ByVal sourceDataset As IGeoDataset _
) As IGeoDataset
[C#]
public IGeoDataset Watershed (
    IGeoDataset directionRaster,
    IGeoDataset sourceDataset
);
[C++]
HRESULT Watershed(
  IGeoDataset* directionRaster,
  IGeoDataset* sourceDataset
);
[C++]

Parameters directionRaster [in]
directionRaster is a parameter of type IGeoDataset* sourceDataset [in]
sourceDataset is a parameter of type IGeoDataset*

Product Availability

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

Remarks

directionRaster

an input Raster, RasterDataset, RasterBand, or RasterDescriptor or FeatureClass, FeatureClassDescriptor showing the direction of flow out of each cell

This can be created using the IHydrologyOp::FlowDirection method.

sourceDataset

an input Raster, RasterDataset, RasterBand, or RasterDescriptor representing cells above which the contributing area, or catchment, will be determined

All cells that are not NoData will be used as source cells.

 

See Also

IHydrologyOp2 Interface