Function Description
Weighted Sum refers to the superposition of multiple Raster Data into a grid according to the specified weight. The calculation principle is as follows: after the grid value of each Raster Data is multiplied by the corresponding weight, the grid pixels at the same position are added to obtain the Result Data. As shown in the figure below, take the first pixel in the upper left corner as an example: grid value 2 * weight 0.7 + grid value 3 * weight 0.3 = 2.3.
![]() |
Weighted Sum Schematic Diagram |
Application scenario
Weighted Sum is often applied to:
- Suitability analysis of vegetation and crops;
- Location analysis of schools, parks, etc.
Function entrance
- Data tab, Data Processing, Grid, Weighted Sum.
- Toolbox-> Data Processing-> Grid-> Weighted Sum.
Parameter Description
- Add Data: click the Add button in the toolbar, and select the input Raster Data in the Select dialog box. The data description is as follows:
- The
- input Raster Data coordinate system shall be consistent;
- Grid Pixel Format can be floating-point type, integer type, unsigned type, etc., and can be inconsistent;
- Weight: Set the weight value of Raster Data, which can be a positive value, a negative value, an integer, or a decimal value. The sum of the weight values does not need to be equal to 1. For example, when analyzing the suitability of crops, if the illumination factor accounts for 50%, the slope factor accounts for 20%, and the slope aspect factor accounts for 30%, the weight of illumination can be set as 0.5, the weight of slope can be set as 0.2, and the weight of slope aspect can be set as 0.3.
- Pixel Format: The default is the Pixel Format of the first Raster Data, which provides 11 formats including 1 bit, 4 bits, 8 bits, 16 bits, 32 bits, 64 bits, Single, and Double. For a description of each format, see the Raster Dataset Pixel Class Format .
- Compress and store the Dataset: After checking this check box, the system will compress and store the Result Dataset, otherwise, it will not be compressed and stored.
- Ignore NoValue Cells: After this check box is checked, the grid cell with no value in the input Raster Dataset will not participate in Algebraic Operation, and the pixel value at the corresponding position in the Result Dataset is still null (usually -9999); If this option is not checked, the pixel value of a grid cell with no value will be used as a normal pixel value in the calculation, and the minimum value (or maximum value) of the Result Raster Dataset will change.
- Result Data: Set Result Datasource and Dataset.
Application example
Case description
According to the relevant data of the existing factors affecting the planning and location of the park, the location of the park is based on the following conditions.
- Terrain: the slope is less than 20 °;
- Elevation: the elevation value is 1000 ~ 1800 m;
- Distance from the lake: not more than 1 km from the lake;
- Distance from street: The candidate area should not be within the 300m buffer zone of the main street.
Data description
The data involved include: Terrain Data, Lake Data, Park Data, Road Data.
Operating Instructions
- Slope: Perform Slope Analysis on the Terrain Data, then perform Algebraic Operation on the slope data, and assign a value of 1 to the slope Is no more than20, and assign a value of 0 to the slope greater than 20. The operation expression is: Con ( Slope < = 20,1,0).
- Elevation: perform Algebraic Operation on Terrain Data, assign 1000 ≤ elevation ≤ 1800 as 1, and assign other values as 0. The operation expression is: Con (1000 < = terrain < = 1800,1,0).
- Lakes: Set the Analysis Bounds of the Set Raster Analysis Environment as Terrain Data, and then Generate Distance Raster the lake data. Perform Algebraic Operation on the Distance Raster obtained from the analysis, assign the value of the distance Is no more than 1000 to 1, and assign the other values to 0. The operation expression is: Con ( LakesDis < = 1000,1,0).
- Road: Perform Algebraic Operation on the Distance Raster obtained by analyzing the road data Generate Distance Raster, and assign the distance Is no less than300 as 1 and other values as 0. The operation expression is: Con ( LakesDis > = 300,1,0).
- Weighted Sum: Click the Data tab-> Data Processing-> Weighted Sum button, and add Raster Data after Algebraic Operation of slope, elevation, lake and road in the pop-up dialog box. The weight values are set to 0.3, 0.25, 0.2, 0.15, respectively.
- Carrying out Raster Algebraic Operation on the data after weighted summation, assigning the grid value Is no less than1 as 1, assigning other values as 0, clipping the Calculate Result and the existing park, and only keeping the data outside the existing park area; If the grid value is 1 after clipping, it is suitable to build a park, and the result is shown in the blue area of the following figure:
Related topics