Summary
Assigns unique values to sections of a raster linear network between intersections.
Illustration
Usage
This raster analysis portal tool is available when you are signed in to an ArcGIS Enterprise portal that has an ArcGIS Image Server configured for Raster Analysis . When the tool is invoked, ArcGIS Pro serves as a client and the processing happens 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 the following: 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
StreamLink(inputStreamRaster, inputFlowDirectionRaster, outputName)
Parameter | Explanation | Data 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 already exists, you will be prompted to provide another name. | String |
Derived Output
Name | Explanation | Data Type |
outputRaster | The output raster. | Raster Layer |
Code sample
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")
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)
Environments
Licensing information
- Basic: Requires ArcGIS Image Server
- Standard: Requires ArcGIS Image Server
- Advanced: Requires ArcGIS Image Server