集水区 (栅格分析)

摘要

确定栅格中一组像元之上的汇流区域。

插图

“集水区”工具图示

使用情况

  • 当您登录到已针对 Raster Analysis 配置 ArcGIS Image ServerArcGIS Enterprise 门户时,可以使用此栅格分析门户工具。 工具运行时,ArcGIS Pro 将充当客户端,并且处理将在与 ArcGIS Enterprise 联合的服务器中进行。 门户工具接受来自门户的图层作为输入,并在门户中创建输出。

    输入栅格图层支持来自门户的图层、影像服务的 URI 或 URL 或创建影像服务器图层工具的输出。 输入要素图层可以是来自门户、URI 或要素服务 URL 的图层。 此工具不支持本地栅格数据或图层。 虽然可以使用本地要素数据和图层作为此门户工具的输入,但是最佳做法是使用门户的图层作为输入。

  • 各个集水区的值将取自输入栅格中源的值或者要素倾泻点数据。 如果倾泻点为栅格数据集,则使用像元值。 当倾泻点是点要素数据集时,值将来自指定的字段。

  • “集水区”工具仅支持 D8 输入流向栅格。 可以使用流向工具(运行默认流向类型 D8)来创建 D8 流向。

  • 当指定输入倾泻点位置作为要素数据时,默认字段将为首个可用的有效字段。 如果不存在有效字段,则 ObjectID 字段(如 OIDFID)将成为默认字段。

参数

标注说明数据类型
输入流向栅格

根据每个像元来显示流向的输入栅格。

Raster Layer; Image Service; String
输入倾泻点栅格或要素

输入倾泻点位置。

Raster Layer; Feature Layer; Image Service; Feature Service; String
输出名称

输出分水岭栅格服务的名称。

默认名称基于工具名称以及输入图层名称。 如果该图层名称已存在,则系统将提示您提供其他名称。

String
倾泻点字段
(可选)

用于为倾泻点位置赋值的字段。

String

派生输出

标注说明数据类型
输出栅格

输出栅格。

Raster Layer

arcpy.ra.Watershed(inputFlowDirectionRaster, inPourPointRasterOrFeatures, outputName, {pourPointField})
名称说明数据类型
inputFlowDirectionRaster

根据每个像元来显示流向的输入栅格。

Raster Layer; Image Service; String
inPourPointRasterOrFeatures

输入倾泻点位置。

Raster Layer; Feature Layer; Image Service; Feature Service; String
outputName

输出分水岭栅格服务的名称。

默认名称基于工具名称以及输入图层名称。 如果该图层名称已存在,则系统将提示您提供其他名称。

String
pourPointField
(可选)

用于为倾泻点位置赋值的字段。

String

派生输出

名称说明数据类型
outputRaster

输出栅格。

Raster Layer

代码示例

Watershed 示例 1(Python 窗口)。

本示例针对流向栅格中选定的倾泻点位置确定汇流区域。

import arcpy
arcpy.ra.Watershed("https://myserver/rest/services/flowdir/ImageServer","https://myserver/rest/services/streamlink/ImageServer","outWatershed1")
Watershed 示例 2(独立脚本)。

本示例针对流向栅格中选定的倾泻点位置确定汇流区域。

#---------------------------------------------------------------------------
# Name: Watershed_example02.py
# Requirements: ArcGIS Image Server

# Import system modules
import arcpy

# Set local variables
inFlowDirection = "https://myserver/rest/services/flowdir/ImageServer"
inPourPoint = "https://myserver/rest/services/streamlink/ImageServer"
outputWatershed = "outWatershed2"

# Execute Watershed raster analysis tool
arcpy.ra.Watershed(inFlowDirection, inPourPoint, outputWatershed)

许可信息

  • Basic: 需要 ArcGIS Image Server
  • Standard: 需要 ArcGIS Image Server
  • Advanced: 需要 ArcGIS Image Server

相关主题