码迷,mamicode.com
首页 > 其他好文 > 详细

ArcGIS教程:水流长度

时间:2015-08-31 15:23:06      阅读:288      评论:0      收藏:0      [点我收藏+]

标签: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教程:水流长度

标签:arcgis教程   水流长度   

原文地址:http://blog.csdn.net/dsac1/article/details/48133113

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!