ArcGIS for Desktop

  • 文档
  • 合约
  • 支持

  • My Profile
  • 帮助
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

专为贵组织打造的制图平台

ArcGIS for Desktop

全面的专业性 GIS

ArcGIS for Server

面向企业的 GIS

ArcGIS for Developers

用于构建位置感知应用程序的工具

ArcGIS Solutions

适用于行业的免费模板地图和应用程序

ArcGIS Marketplace

获取适用于组织的应用程序和数据

  • 文档
  • 合约
  • 支持
Esri
  • 登录
user
  • 我的个人资料
  • 登出

帮助

  • 主页
  • 入门
  • 制图
  • 分析
  • 管理数据
  • 工具
  • 更多...

WOTable

需要 Spatial Analyst 许可。

  • 摘要
  • 讨论
  • 语法
  • 属性
  • 代码实例

摘要

定义输入栅格、标识输入值的字段、栅格值的重映射、每个栅格的权重以及评估等级供加权叠加工具使用。

讨论

加权叠加工具使用 WOTable 对象。

对于在 WOTable 对象中标识的输入栅格中的每个值,加权叠加工具可根据重映射对象指定新值。两个可用的重映射类为 RemapValue 和 RemapRange。然而,由于 WOTable 通常用于处理分类数据,因此,建议输入 RemapValue 对象。

在加权叠加工具中,WOTable 对象中的每个输入栅格都是根据其重要性或者影响力百分比(此对象也进行了定义)进行加权。权重是相对百分比,并且影响力百分比权重的总和必须等于 100%。

“起始”、“终止”和“增量”评估级别参数不会影响所得计算值,但是却必须输入。

语法

 WOTable (weightedOverlayTable, evaluationScale)
参数说明数据类型
weightedOverlayTable
[[inRaster, influence, field, Remap],...]

The table specifying the input rasters, their influence, the field to use, and the remap table identifying what the old values should be remapped to.

  • inRaster—The input raster criteria being weighted.
  • influence—The influence of the raster compared to the other criteria (data type: double).
  • field—The field of the criteria raster to use for weighting (data type: string).
  • Remap—The Remap object identifies the scaled weights for the input criterion.

In addition to numerical values for the scaled weights in the remap table, the following options are available:

  • RESTRICTED—Assigns the restricted value to cells in the output, regardless of whether other input rasters have a different scale value set for that cell.
  • NODATA—Assigns NoData to cells in the output, regardless of whether other input rasters have a different scale value set for that cell.
List
evaluationScale
[from, to, by]

The range and interval for the new values in which to remap the old values. The parameter is required for both the dialog box and scripting but it has no effect in scripting.

  • from—Is the lowest value to use for the new values (data type: double).
  • to—Is the highest value to use for the new values (data type: double).
  • by—Is the interval between the new remap values (data type: double).
List

属性

属性说明数据类型
weightedOverlayTable
(读写)

包含用于标识将要重映射的栅格的加权叠加表、每个栅格的影响程度、要重映射的值和要将其重映射至的值。

List
evaluationScale
(读写)

重映射旧值时所采用的新值的范围和间隔。

List

代码实例

WOTable 示例 1(Python 窗口)

演示如何创建 WOTable 类以及如何在 Python 窗口的 WeightedOverlay 工具中使用该类。

import arcpy
from arcpy import env
from arcpy.sa import *
env.workspace = "C:/sapyexamples/data"
myWOTable = WOTable([["snow", 50, "VALUE", RemapValue([[0, 1], [1, 1], [5, 5],
                    [6, 6], [7, 7], [8, 8], [9, 9], ["NODATA", "NODATA"]])],
                    ["land", 20, "VALUE", RemapValue([[0, 1], [1, 1], [5, 5],
                    [6, 6],[7, 7], [8, 8], [9, 9], ["NODATA", "NODATA"]])],
                    ["soil", 30, "VALUE", RemapValue([[0, 1], [1, 1], [2, 2],
                    [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9],
                    ["NODATA", "NODATA"]])]], [1, 9, 1])
outWeightedOverlay = WeightedOverlay(myWOTable)
outWeightedOverlay.save("C:/sapyexamples/output/woverlaytbl")
WOTable 示例 2(独立脚本)

使用 WOTable 类执行加权叠加分析。

# Name: WOTable_Ex_02.py
# Description: Uses the WOTable object to execute WeightedOverlay tool.
# 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
inRaster1 = "snow"
inRaster2 = "land"
inRaster3 = "soil"

# Define WOTable 
myWOTable = WOTable([[inRaster1, 50, "VALUE", RemapValue([[1, 1], [5, 5],
                    [6, 5], [7, 5], [8, 9], [9, 9], ["NODATA", "NODATA"]])],
                    [inRaster2, 20, "VALUE", RemapValue([[1, 1], [5, 5],
                    [6, 5], [7, 5], [8, 9], [9, 9], ["NODATA", "NODATA"]])],
                    [inRaster3, 30, "VALUE", RemapValue([[1, 1], [2, 1],
                    [3, 1], [4, 5], [5, 5], [6, 5], [7, 9], [8, 9], [9, 9],
                    ["NODATA", "NODATA"]])]], [1, 9, 1])
 
# Check out the ArcGIS Spatial Analyst extension license
arcpy.CheckOutExtension("Spatial")

# Execute WeightedOverlay
outWeightedOverlay = WeightedOverlay(myWOTable)

# Save the output 
outWeightedOverlay.save("C:/sapyexamples/output/woverlaytbl2")

相关主题

  • Spatial Analyst 类概述
  • 叠加类概述
  • 了解叠加分析
  • 叠加分析方法
有关此主题的反馈?

ArcGIS for Desktop

  • 主页
  • 文档
  • 合约
  • 支持

ArcGIS 平台

  • ArcGIS Online
  • ArcGIS for Desktop
  • ArcGIS for Server
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

关于 Esri

  • 关于我们
  • 招贤纳士
  • 内部人员博客
  • 用户大会
  • 开发者峰会
Esri
© Copyright 2016 Environmental Systems Research Institute, Inc. | 隐私政策 | 法律声明