加权叠加 (空间分析)

许可等级:BasicStandardAdvanced

摘要

使用常用测量比例叠加多个栅格数据,并根据各栅格数据的重要性分配权重。

了解有关“加权叠加”工作原理的详细信息

插图

Weighted Overlay illustration
In the illustration, the two input rasters have been reclassified to a common measurement scale of 1 to 3. Each raster is assigned a percentage influence. The cell values are multiplied by their percentage influence, and the results are added together to create the output raster. For example, consider the top left cell. The values for the two inputs become (2 * 0.75) = 1.5 and (3 * 0.25) = 0.75. The sum of 1.5 and 0.75 is 2.25. Because the output raster from Weighted Overlay is integer, the final value is rounded to 2.

用法

语法

WeightedOverlay (in_weighted_overlay_table)
参数说明数据类型
in_weighted_overlay_table

使用“加权叠加工具”可执行多个栅格数据之间的多条件分析计算。

叠加分析类用于定义表。WOTable 对象用于指定条件栅格及其各自的属性。

对象形式为:

  • WOTable(weightedOverlayTable, evaluationScale)

WOTable

返回值

名称说明数据类型
out_raster

输出适宜性栅格。

Raster

代码实例

WeightedOverlay 示例 1(Python 窗口)

本示例创建了一个可识别滑雪场的潜在位置的适宜性 IMG 栅格。

import arcpy
from arcpy import env  
from arcpy.sa import *
env.workspace = "C:/sapyexamples/data"

outsuit = WeightedOverlay(WOTable(
           [
            ["snow", 50, 'VALUE', RemapValue([[1,"Nodata"],[5,3],[9,10],["NODATA","NODATA"]])], 
            ["land", 20, '', RemapValue([["water","1"],["forest",5],["open field",9],["NODATA", "NODATA"]])],
            ["soil", 30, 'VALUE', RemapValue([[1,"Restricted"],[5,5],[7,7],[9,9],["NODATA", "Restricted"]])]
           ],[1,9,1]))
outsuit.save("C:/sapyexamples/output/outsuit.img")
WeightedOverlay 示例 2(独立脚本)

本示例创建了一个可识别滑雪场的潜在位置的适宜性 IMG 栅格。

# Name: WeightedOverlay_Ex_02.py
# Description: Overlays several rasters using a common scale and weighing 
#    each according to its importance.
# 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"

remapsnow = RemapValue([[0,1],[1,1],[5,5],[9,9],["NODATA","NODATA"]])
remapland = RemapValue([[1,1],[5,5],[6,6],[7,7],[8,8],[9,9],["NODATA","Restricted"]])
remapsoil = RemapValue([[0,1],[1,1],[5,5],[6,6],[7,7],[8,8],[9,9],["NODATA", "NODATA"]])

myWOTable = WOTable([[inRaster1, 50, "VALUE", remapsnow],
                     [inRaster2, 20, "VALUE", remapland], 
                     [inRaster3, 30, "VALUE", remapsoil]
					          ], [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/weightover2")

环境

相关主题

许可信息

ArcGIS for Desktop Basic: 需要 Spatial Analyst
ArcGIS for Desktop Standard: 需要 Spatial Analyst
ArcGIS for Desktop Advanced: 需要 Spatial Analyst
5/10/2014