Overlays several rasters multiplying each by their given weight and summing them together.
Learn more about how Weighted Sum works
Overlays several rasters multiplying each by their given weight and summing them together.
Learn more about how Weighted Sum works
Command line and Scripting
In the illustration above, the cell values are multiplied by their weight factor, 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.2 * 0.75) = 1.65 and (3 * 0.25) = 0.75. The sum of 1.5 and 0.75 is 2.4.
Input rasters can be integer or floating point.
The weight values can be any positive or negative decimal value. It is not restricted to a relative percentage or equal to 1.0.
The weight will be applied to the specified field for the input raster. Fields can be of type, short or long integer, double or float.
The output raster will always be of floatingpoint type.
A useful way to add several rasters together is to input multiple rasters and set all weights equal to 1.
The following environment settings affect this tool:
Parameter  Explanation  Datatype 

Input rasters (Required) 
The weighted sum table allows the calculation of a several rasters.

(Composite Geodataset Field String; Composite Geodataset Field String;...) 
Output raster (Required) 
The raster to be created.

Raster Dataset 
# 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()