专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > CGI

ArcGIS课程:水流长度

发布时间:2010-05-20 14:01:29 文章来源:www.iduyao.cn 采编人员:星星草
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")

版权声明:本文为博主原创文章,未经博主允许不得转载。

友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: