Weighted Sum

Overlays several rasters multiplying each by their given weight and summing them together.

Learn more about how Weighted Sum works


Illustration

Weighted Sum illustration

Usage tips

Command line and Scripting

Syntax

WeightedSum_sa (in_rasters, out_raster)
Parameter Explanation Datatype
Input rasters (Required)

The weighted sum table allows the calculation of a several rasters.

  • Raster — The raster being weighted.
  • Field — The field of the raster to use for weighting.
  • Weight — The weight value to multiply to the raster.

(Composite Geodataset Field String; Composite Geodataset Field String;...)
Output raster (Required)

The raster to be created.

Raster Dataset
Data types for geoprocessing tool parameters

Script Example

# WeightedSum_sample.py
# Description: 
#   Overlays several rasters multiplying each by their given
#   weight and summing them together.
# Requirements: None
# Author: ESRI
# Date: Nov 1, 2005

# Import system modules
import arcgisscripting

# Create the Geoprocessor object
gp = arcgisscripting.create()

try:
    # Set local variables
    sInRasters = "C:/temp/ras01 VALUE 0.75; C:/temp/ras02 VALUE 0.25"
    sOutRaster = "C:/temp/out_wsum"

    # Process: WeightedSum
    WeightedSum_sa (sInRasters, sOutWSUM)

except:
    # If an error occurred while running a tool, then print the messages.
    print gp.GetMessages()

Map Algebra syntax

Not Available


ArcObjects syntax

Not Available


See Also

  • Understanding overlay analysis