Derive Stream As Raster (Spatial Analyst)

Available with Spatial Analyst license.

Summary

Generates a stream raster from an input surface raster with no prior sink or depression filling required.

Usage

  • The input surface raster can be a digital elevation model (DEM) with no prior sink filling or a hydroconditioned DEM. The tool is not sensitive to errors in the surface raster that can act as depressions or sinks where flow terminates; filling sinks or depressions is not necessary.

  • The Output stream raster parameter value represents the cells with a higher or equal flow accumulation threshold, specified through the optional Accumulation threshold (accumulation_threshold in Python) parameter. If no Accumulation threshold value is provided, by default, the tool calculates an area threshold based on the input surface raster size (0.2 percent of the total number of cells). While flow direction and accumulation are calculated internally to derive streams, they are not an output. Use Derive Continuous Flow to obtain flow accumulation and flow direction rasters using the same methodology.

  • When the input surface raster contains real depressions within the surface raster, the depressions must be specified in Input raster or feature depressions data (in_depressions_data in Python) to be considered cells where water can flow into but not outward (an outlet). Depression area information can be either a raster or a feature class. The feature class can be a point, polyline, or polygon.

  • An Input accumulation weight raster (in_weight_raster in Python) value can be specified to apply a weight to each cell when deriving accumulation, which is an intermediate step. If a weight raster is applied, select an appropriate flow accumulation threshold for Accumulation threshold (accumulation_threshold in Python).

  • If Input raster or features depressions data, Input accumulation weight raster parameters or data to apply environment settings is used, the default Accumulation threshold will be recalculated based on the area of intersection between the inputs. However, once you have specified a value for the Accumulation threshold, it will no longer be recalculated based on changes in input selection. You may encounter the same situation when running the tool in batch using the Input surface raster as batch parameter, where the Accumulation threshold is calculated based on the first input and will not change as other raster layers are being processed in batch.

  • Specify an Accumulation threshold (accumulation_threshold in Python) value that reflects the complexity of the terrain in the study area or that matches the size of a contributing area of your choice. For example, if the threshold is equal to 20 hectares, only cells with 20 or more hectares of upstream flow will define a stream raster

  • Use the Stream designation method parameter to assign a unique value of stream sections between intersections or an order to the segments of streams. The Constant option is set by default, and all streams are assigned the same value equal to 1. When Unique is selected, each stream section between intersections will be assigned a unique value. Additional ordering methods are Strahler, Shreve, and Hack (Strahler, 1957; Shreve, 1966; Hack, 1957). The Strahler order of a stream increases when streams of the same order intersect. The Shreve order assigns order to streams based on magnitude. 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. The Hack order of a stream increases by one with respect to the order of a stream to which it discharges. The main river channel is assigned a magnitude of 1, and all streams discharging to it are assigned a magnitude of 2, and so on.

  • NoData cells are considered noise and by definition do not have an associated value. The tool will ignore these cells when identifying the direction of the least steep uphill neighbor, as well as in the determination of flow direction and accumulation.

  • With the Force all edge cells to flow outward parameter unchecked (force_flow = "NORMAL" in Python), the default setting, a cell at the edge of the surface raster will flow toward the inner cell with the steepest drop in z-value. If the drop is less than or equal to zero, the cell will flow out of the surface raster.

    This will affect the direction of flow at the edge of the surface raster, as well as the accumulation and ultimately the definition of streams.
  • When the output raster format is .crf, this tool supports the Pyramid raster storage environment. Pyramids will be created in the output by default. For any other output format, this environment is not supported, and pyramids will not be created.

  • See Analysis environments and Spatial Analyst for additional details on the geoprocessing environments that apply to this tool.

  • References:

    • Ehlschlaeger, C. R. 1989. "Using the AT Search Algorithm to Develop Hydrologic Models from Digital Elevation Data." International Geographic Information Systems (IGIS) Symposium 89: 275-281.

    • Hack, J. T. 1957. "Studies of Longitudinal Stream Profiles in Virginia and Maryland." Geological Survey Professional Paper 294: 45–95.

    • Jenson, S. K., and Domingue, J. O. 1988. "Extracting Topographic Structure from Digital Elevation Data for Geographic Information System Analysis." Photogrammetric Engineering and Remote Sensing 54 (11): 1593–1600.

    • Metz, M., Mitasova, H., & Harmon, R. S. 2011. "Efficient extraction of drainage networks from massive, radar-based elevation models with least cost path search." Hydrology and Earth System Sciences 15(2): 667-678.

    • Shreve, R. 1966. "Statistical Law of Stream Numbers" Journal of Geology.74: 17-35

    • Strahler, A. N. 1957. "Quantitative analysis of watershed geomorphology" Transactions of the American Geophysical Union8 (6): 913-920

Parameters

LabelExplanationData Type
Input surface raster

The input surface raster.

Raster Layer
Input raster or feature depressions data
(Optional)

An optional dataset that defines real depressions.

The depressions can be defined either through a raster or a feature layer.

If input is a raster, the depression cells must take a valid value, including zero, and the areas that are not depressions must be NoData.

Composite Geodataset
Input accumulation weight raster
(Optional)

An optional input raster dataset that defines the fraction of flow that contributes to flow accumulation at each cell.

The weight is only applied to the accumulation of flow.

If no accumulation weight raster is specified, a default weight of 1 will be applied to each cell.

Raster Layer
Accumulation threshold
(Optional)

The threshold for determining whether a given cell is part of a stream in terms of the total area that flows into such cell.

Areal Unit
Stream designation method
(Optional)

Specifies the unique or order of the streams in the output.

  • ConstantThe output cell values will all equal 1. This is the default.
  • UniqueEach stream will have a unique ID between intersections in the output.
  • StrahlerThe Strahler method, in which stream order only increases when streams of the same order intersect, will be used. The intersection of a first-order and second-order link will remain a second-order link, rather than creating a third-order link.
  • ShreveThe Shreve method, in which stream order is assigned by magnitude, will be used. 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.
  • HackThe Hack method, in which each stream segment is assigned an order greater than the stream or river to which it discharges, will be used. For example, the main river channel is assigned an order of 1, all stream segments discharging to it are assigned an order of 2, any stream discharging to an order 2 stream is assigned an order of 3, and so on.
String
Force all edge cells to flow outward
(Optional)

Specifies whether edge cells will always flow outward or follow normal flow rules.

  • Unchecked—If the maximum drop on the inside of an edge cell is greater than zero, the flow direction will be determined as usual; otherwise, the flow direction will be toward the edge. Cells that should flow from the edge of the surface raster inward will do so. This is the default.
  • Checked—All cells at the edge of the surface raster will flow outward from the surface raster.
Boolean

Return Value

LabelExplanationData Type
Output stream raster

The output raster representing stream locations.

Raster

DeriveStreamAsRaster(in_surface_raster, {in_depressions_data}, {in_weight_raster}, {accumulation_threshold}, {stream_designation_method}, {force_flow})
NameExplanationData Type
in_surface_raster

The input surface raster.

Raster Layer
in_depressions_data
(Optional)

An optional dataset that defines real depressions.

The depressions can be defined either through a raster or a feature layer.

If input is a raster, the depression cells must take a valid value, including zero, and the areas that are not depressions must be NoData.

Composite Geodataset
in_weight_raster
(Optional)

An optional input raster dataset that defines the fraction of flow that contributes to flow accumulation at each cell.

The weight is only applied to the accumulation of flow.

If no accumulation weight raster is specified, a default weight of 1 will be applied to each cell.

Raster Layer
accumulation_threshold
(Optional)

The threshold for determining whether a given cell is part of a stream in terms of the total area that flows into such cell.

Areal Unit
stream_designation_method
(Optional)

Specifies the unique or order of the streams in the output.

  • CONSTANTThe output cell values will all equal 1. This is the default.
  • UNIQUEEach stream will have a unique ID between intersections in the output.
  • STRAHLERThe Strahler method, in which stream order only increases when streams of the same order intersect, will be used. The intersection of a first-order and second-order link will remain a second-order link, rather than creating a third-order link.
  • SHREVEThe Shreve method, in which stream order is assigned by magnitude, will be used. 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.
  • HACKThe Hack method, in which each stream segment is assigned an order greater than the stream or river to which it discharges, will be used. For example, the main river channel is assigned an order of 1, all stream segments discharging to it are assigned an order of 2, any stream discharging to an order 2 stream is assigned an order of 3, and so on.
String
force_flow
(Optional)

Specifies whether edge cells will always flow outward or follow normal flow rules.

  • NORMALIf the maximum drop on the inside of an edge cell is greater than zero, the flow direction will be determined as usual; otherwise, the flow direction will be toward the edge. Cells that should flow from the edge of the surface raster inward will do so. This is the default.
  • FORCEAll cells at the edge of the surface raster will flow outward from the surface raster.
Boolean

Return Value

NameExplanationData Type
out_stream_raster

The output raster representing stream locations.

Raster

Code sample

DeriveStreamAsRaster example 1(Python window)

This example creates a stream raster in which all identified streams are assigned a constant value of 1.

from arcpy.sa import *
out_stream_raster = DeriveStreamAsRaster("surface.tif", "", "", "", 
                                        "", "")
out_stream_raster.save("C:/arcpyExamples/outputs/out_stream_raster.tif")
DeriveStreamAsRaster example 2 (stand-alone script)

This example creates a stream raster considering real depressions where streams start from locations with catchment areas larger than 2 hectares.

Each segment between intersections of the output stream raster is also assigned a unique value.

# Name: DeriveStreamAsRaster_standalone.py
# Description: Generates a stream raster considering real depressions where 
#              streams start from locations with catchment areas larger than 2 Hectares.
# Requirements: Spatial Analyst Extension

# Import system modules
import arcpy
from arcpy.sa import *

# Check out the ArcGIS Spatial Analyst extension license
arcpy.CheckOutExtension("Spatial")

# Set the analysis environments
arcpy.env.workspace = "C:/arcpyExamples/data"

# Set the local variables
in_surface_raster = "surface.tif"
in_depressions_data = "depressions.tif"
stream_raster = "C:/arcpyExamples/outputs/stream_raster.tif"

# Execute DeriveStreamAsRaster
out_stream_raster = DeriveStreamAsRaster(in_surface_raster, in_depressions_data, 
                                        "", "2 Hectares", "UNIQUE", "")
# Save the output
out_stream_raster.save(stream_raster)

Related topics