ArcGIS教程:水流長度

來源:互聯網
上載者:User

標籤:arcgis教程   水流長度   

  摘要

  計算沿每個像元的流路徑的上遊(或下遊)距離或加權距離。

  用法

  · 水流長度輸出柵格的值類型為浮點型。

  · 水流長度工具的主要用途是計算給定盆地內最長水流的長度。該度量值常用於計算盆地的聚集時間。這可使用 UPSTREAM選項來完成。

  該工具也可通過將權重柵格用作下坡運動的阻抗,來建立假設降雨和徑流事件的距離-面積圖。

  文法

  FlowLength (in_flow_direction_raster, {direction_measurement}, {in_weight_raster})

  代碼執行個體

  水流長度 (FlowLength) 樣本 1(Python 視窗)

  本例計算沿每個像元的流路徑的下遊距離。

  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")

  水流長度 (FlowLength) 樣本 2(獨立指令碼)

  本例計算沿每個像元的流路徑的下遊距離。

  # 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")

著作權聲明:本文為博主原創文章,未經博主允許不得轉載。

ArcGIS教程:水流長度

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.