ArcGIS Tutorial: Water flow length

Source: Internet
Author: User

  Summary

Calculates the upstream (or downstream) distance or weighted distance of the flow path along each cell.

  Usage

· Water flow length The value type of the output raster is floating-point.

· The main purpose of the flow length tool is to calculate the length of the longest flow in a given basin. This measure is often used to calculate the aggregation time of a basin. This can be done using the upstream option.

The tool can also create a distance-area chart of hypothetical rainfall and runoff events by using the weighted raster as the impedance for downhill motion.

  Grammar

Flowlength (In_flow_direction_raster, {direction_measurement}, {in_weight_raster})

  Code instance

  Flow Length (Flowlength) Example 1 (Python window)

This example calculates the downstream distance along the flow path for each cell.

Import arcpy

From arcpy Import env

From ARCPY.SA Import *

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

Outflowlength = Flowlength ("Flowdir", "downstream", "" ")

Outflowlength.save ("C:/sapyexamples/output/outflowlen01")

  Flow Length (Flowlength) Example 2 (stand-alone script)

This example calculates the downstream distance along the flow path for each cell.

# 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

Inflowdirectionraster = "Flowdir"

Inweightraster = ""

Directiontype = "Downstream"

# Check out the ArcGIS Spatial Analyst extension License

arcpy. Checkoutextension ("Spatial")

# Execute

Outflowlength = Flowlength (Inflowdirectionraster, Directiontype, Inweightraster)

# Save the output

Outflowlength.save ("C:/sapyexamples/output/outflowlen02.tif")

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

ArcGIS Tutorial: Water flow length

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.