ArcGIS for Desktop

  • Documentación
  • Precios
  • Soporte

  • My Profile
  • Ayuda
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

La plataforma de representación cartográfica para tu organización

ArcGIS for Desktop

Un completo SIG profesional

ArcGIS for Server

SIG en tu empresa

ArcGIS for Developers

Herramientas para crear aplicaciones basadas en la ubicación

ArcGIS Solutions

Plantillas de aplicaciones y mapas gratuitas para tu sector

ArcGIS Marketplace

Obtén aplicaciones y datos para tu organización.

  • Documentación
  • Precios
  • Soporte
Esri
  • Iniciar sesión
user
  • Mi perfil
  • Cerrar sesión

Help

  • Inicio
  • Introducción
  • Mapa
  • Analizar
  • Administrar datos
  • Herramientas
  • Más...

WSTable

Disponible con una licencia de Spatial Analyst.

  • Resumen
  • Debate
  • Sintaxis
  • Propiedades
  • Ejemplo de código

Resumen

Defines the input rasters and their weights which will be added together in the WeightedSum tool.

Debate

The Weighted Sum tool uses the WSTable object.

Input rasters can be integer or floating point.

The weight values can be any positive or negative decimal value. The weights do not need to add to any specific value such as 100 (representing each raster's percent influence).

Sintaxis

 WSTable (weightedSumTable)
ParámetroExplicaciónTipo de datos
weightedSumTable
[[inRaster, field, weight],...]

The table specifying the input rasters, the fields to use for the values for each raster, and the weight by which to multiply each raster.

  • InRaster—Is the raster being weighted (data type: string).
  • field—The field in the raster to use for the input values (data type: string).
  • weight—The weight value by which to multiple the raster (data type: double).

List

Propiedades

PropiedadExplicaciónTipo de datos
weightedSumTable
(Lectura y escritura)

Contains the weighted sum table specifying the rasters to be added, the fields identifying the values to use for each raster, and the amount of influence each raster will have in the addition.

List

Ejemplo de código

WSTable example 1 (Python window)

Demonstrates how to create a WSTable class and use it in the WeightedSum tool within the Python window.

import arcpy
from arcpy import env
from arcpy.sa import *
env.workspace = "C:/sapyexamples/data"
myWSumTable = WSTable([["snow", "VALUE", 0.2], ["land", "VALUE", 0.3], ["soil",
                    "VALUE", 0.5]])
outWSumT = WeightedSum(myWSumTable)
outWSumT.save("C:/sapyexamples/output/wsumtable")
WSTable example 2 (stand-alone script)

Performs a weighted sum analysis using the WSTable class.

# Name: WSTable_Ex_02.py
# Description: Demonstrate executing WeightedSum using the WSTable object.
# 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
inRaster01 = "snow"
field01 = "VALUE"
weight01 = 0.25
inRaster02 = "land"
field02 = "VALUE"
weight02 = 0.25
inRaster03 = "soil"
field03 = "VALUE"
weight03 = 0.5

# Define WSTable 
myWSumTable = WSTable([[inRaster01, field01, weight01], [inRaster02, field02,
                        weight02], [inRaster03, field03, weight03]])

# Check out the ArcGIS Spatial Analyst extension license
arcpy.CheckOutExtension("Spatial")

# Execute WeightedSum
outWSumT = WeightedSum(myWSumTable)

# Save the output 
outWSumT.save("C:/sapyexamples/output/wsumtable2")

Temas relacionados

  • An overview of Spatial Analyst classes
  • An overview of overlay classes
  • Comprender el análisis de superposición
  • Enfoques del análisis de superposición
¿Algún comentario sobre este tema?

ArcGIS for Desktop

  • Inicio
  • Documentación
  • Precios
  • Soporte

Plataforma ArcGIS

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

Acerca de Esri

  • Quiénes somos
  • Empleo
  • Blog interno
  • Conferencia de usuarios
  • Cumbre de desarrolladores
Esri
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacidad | Legal