Stream Link (Raster Analysis)

Summary

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

Illustration

Stream Link tool illustration

Usage

  • This raster analysis portal tool is available when you are signed in to an ArcGIS Enterprise Link to Understanding analysis in ArcGIS Enterprise portal that has an ArcGIS Image Server Link to What is ArcGIS Image Server configured for Raster Analysis Link to Configure and deploy raster analytics. When the tool is invoked, ArcGIS Pro serves as a client and the processing occurs in the servers federated with ArcGIS Enterprise. The portal tool accepts layers from your portal as input and creates output in your portal.

    The input raster layer supports a layer from the portal, a URI or URL to an image service, or the output from the Make Image Server Layer tool. This tool does not support local raster data or layers.

  • 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

arcpy.ra.StreamLink(inputStreamRaster, inputFlowDirectionRaster, outputName)
ParameterExplanationData Type
inputStreamRaster

An input raster that represents a linear stream network.

Raster Layer; Image Service; String
inputFlowDirectionRaster

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

Raster Layer; Image Service; String
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 name already exists, you will be prompted to provide another name.

String

Derived Output

NameExplanationData Type
outputRaster

The output raster.

Raster Layer

Code sample

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)

Licensing information

  • Basic: Requires ArcGIS Image Server
  • Standard: Requires ArcGIS Image Server
  • Advanced: Requires ArcGIS Image Server

Related topics