Stream Link (Raster Analysis)

Titleā€ƒ Stream Link (Raster Analysis)

Summary

Assigns unique values to sections of a raster linear network between intersections.


Illustration

Stream Link tool illustration Stream Link tool illustration

Usage

Links are the sections of a stream channel connecting two successive junctions, a junction and the outlet, or a junction and the drainage divide.

The input stream raster can be created by thresholding the results of the Flow Accumulation tool.

The stream raster linear network should be represented as values greater than or equal to one on a background of NoData.


Syntax

Parameter Explanation
inputStreamRaster

An input raster that represents a linear stream network.

inputFlowDirectionRaster

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

outputName

The name of the output stream link raster service.

The default name is based on the tool name and the input layer name. If the layer already exists, you will be prompted to provide another name.

Code Samples

StreamLink example 1 (Python window)

This example assigns unique values to sections of a raster linear network between intersections.


import arcpy
arcpy.StreamLink_ra("https://myserver/rest/services/streams/ImageServer","https://myserver/rest/services/flowdir/ImageServer","outStreamLink1")
                    

StreamLink example 2 (stand-alone script)

This example assigns unique values to sections of a raster linear network between intersections.


#---------------------------------------------------------------------------
# Name: StreamLink_example02.py
# Requirements: ArcGIS Image Server

# Import system modules
import arcpy

# Set local variables
inStreams = "https://myserver/rest/services/streams/ImageServer"
inFlowDirection = "https://myserver/rest/services/flowdir/ImageServer"
outputStreamLink = "outStreamLink2"

# Execute Stream Link raster analysis tool
arcpy.StreamLink_ra(inStreams, inFlowDirection, outputStreamLink)
                    

Tags

Credits

Use limitations