Stream Order

Assigns a numeric order to segments of a raster representing branches of a linear network.


Usage tips

Command line and Scripting

Map Algebra

ArcObjects

Syntax

StreamOrder_sa (in_stream_raster, in_flow_direction_raster, out_raster, order_method)
Parameter Explanation Datatype
Input stream raster (Required)

An input raster that represents a linear stream network.

Composite Geodataset
Input flow direction raster (Required)

The input raster that records the direction of flow out of each cell.

This can be created with the Flow Direction function.

Composite Geodataset
Output raster (Required)

The output stream order raster.

Raster Dataset
Method of stream ordering (Optional)

The method used for assigning stream order.

  • STRAHLER — The method of stream ordering proposed by Strahler in 1952. Stream order only increases when streams of the same order intersect. Therefore, the intersection of a first-order and second-order link will remain a second-order link, rather than create a third-order link. This is the default.

  • SHREVE — The method of stream ordering by magnitude, proposed by Shreve in 1967. All links with no tributaries are assigned a magnitude (order) of one. Magnitudes are additive downslope. When two links intersect, their magnitudes are added and assigned to the downslope link.

String
Data types for geoprocessing tool parameters

Script Example

# StreamOrder_sample.py
# Description: 
#   Assigns a numeric order to segments of a raster representing
#   branches of a linear network.
# Requirements: None
# Author: ESRI
# Date: Sept 6, 2005

# Import system modules
import arcgisscripting

# Create the Geoprocessor object
gp = arcgisscripting.create()

try:
    # Set local variables
    InStreamRaster = "C:/data/stream"
    InFlowDirectionRaster = "C:/data/flowdir"
    OutRaster = "C:/data/streamorder"
    InMethod = "STRAHLER"

    # Check out Spatial Analyst extension license
    gp.CheckOutExtension("Spatial")

    # Process: StreamOrder
    gp.StreamOrder_sa(InStreamRaster, InFlowDirectionRaster, OutRaster, InMethod)

except:
    # If an error occurred while running a tool, then print the messages.
    print gp.GetMessages()

Map Algebra syntax

StreamOrder(<net_grid>, <dir_grid>, {STRAHLER | SHREVE})

Parameter Explanation
<net_grid> A grid representing a linear stream network.
<dir_grid> A grid showing direction of flow out of each cell. This can be created using the FlowDirection function.
{STRAHLER | SHREVE} Keyword indicating the method for assigning order.
  • STRAHLER — The method of stream ordering proposed by Strahler in 1952. Stream order only increases when streams of the same order intersect. Therefore, the intersection of a first-order and second-order link will remain a second-order link rather than create a third-order link. This is the default.
  • SHREVE — The method of stream ordering by magnitude proposed by Shreve in 1967. All links with no tributaries are assigned a magnitude (order) of one. Magnitudes are additive downslope. When two links intersect, their magnitudes are added and assigned to the downslope link.

Map Algebra example

streamorder(channel_grid, flow_dir, strahler)
streamorder(channel_grid, flow_dir, shreve)

ArcObjects syntax

IHydrologyOp::StreamOrder (streamRaster As IGeoDataset, directionRaster As IGeoDataset, orderType As esriGeoAnalysisStreamOrderEnum) As IGeoDataset

Parameter Explanation
streamRaster An input Raster, RasterDataset, RasterBand, or RasterDescriptor representing a linear stream network.
directionRaster An input Raster, RasterDataset, RasterBand, or RasterDescriptor showing the direction of flow out of each cell. This can be created using the IHydrologyOp::FlowDirection method.
orderType An esriGeoAnalysisStreamOrderEnum indicating the method for assigning order.
  • esriGeoAnalysisStreamOrderStrahler — The method will be the stream ordering proposed by Strahler in 1952. Stream order only increases when streams of the same order intersect. Therefore, the intersection of a first-order and second-order link will remain a second-order link rather than create a third-order link. This method is commonly used.
  • esriGeoAnalysisStreamOrderShreve — The method will be stream ordering by magnitude proposed by Shreve in 1967. All links with no tributaries are assigned a magnitude (order) of one. Magnitudes are additive downslope. When two links intersect, their magnitudes are added and assigned to the downslope link.

ArcObjects example

' Create the RasterHydrologyOp object
Dim pHydrologyOp As IHydrologyOp
Set pHydrologyOp = New RasterHydrologyOp

' Declare the input stream raster object
Dim pInputStream As IGeoDataset

' Calls function to open a raster dataset from disk
Set pInputStream = OpenRasterDataset ("D:\SpatialData", "inputstream")

' Declare the input direction raster object
Dim pDirection As IGeoDataset

' Calls function to open a raster dataset from disk
Set pDirection = OpenRasterDataset	("D:\SpatialData", "direction")

' Declare the output raster object
Dim pOutputRaster As IGeoDataset

' Calls the method
Set pOutputRaster = pHydrologyOp.StreamOrder (pInputStream, pDirection, esriGeoAnalysisStreamOrderShreve)

See Also

  • Stream Link
  • Stream to Feature
  • An overview of the Hydrology tools