ArcGIS Tutorial: Stream connections

Source: Internet
Author: User

 Summary

Assigns unique values to the parts of a grid-line network between junctions.

  Usage

· "Connection" means the section of a river that connects two adjacent junctions, connects to a junction and outlet, or joins a junction and watershed.

  

· The input stream raster data can be created by setting thresholds for the results of the traffic tool.

· On the background of NoData, the stream grid line network should be represented as a value greater than or equal to one.

 Grammar

Streamlink (In_stream_raster, In_flow_direction_raster)

  Code instance

  Streamlink Example 1 (Python window)

This example assigns a unique value to each part of the grid-line network between junctions.

Import arcpy

From arcpy Import env

From ARCPY.SA Import *

Env.workspace = "C:/sapyexamples/data"

Outstreamlink = Streamlink ("Stream", "Flowdir")

Outstreamlink.save ("C:/sapyexamples/output/outstrmlnk01")

  Streamlink Example 2 (stand-alone script)

This example assigns a unique value to each part of the grid-line network between junctions.

# Name: _ex_02.py

# Description:

# requirements:spatial Analyst Extension

# Import System Modules

Import arcpy

From arcpy Import env

From ARCPY.SA Import *

# Set Environment settings

Env.workspace = "C:/sapyexamples/data"

# Set Local Variables

Instreamraster = "Stream"

Inflowdirection = "Flowdir"

# Check out the ArcGIS Spatial Analyst extension License

arcpy. Checkoutextension ("Spatial")

# Execute Streamlink

Outstreamlink = Streamlink (Instreamraster, inflowdirection)

# Save the output

Outstreamlink.save ("c:/sapyexamples/output/outstrmlnk02")

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

ArcGIS Tutorial: Stream connections

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.