How would you find the answer to this?
Assume that two two-by-two source rasters contain the following values:
Raster 1:
7 14
10 36
Raster 2:
5 2
2 5
What would be the sum of all pixel values in the raster that would be created using the following map algebra expression?
Expression: [Raster 1] * [Raster 2]
To find the answer to this question, you would follow these steps:
Step 1: Perform element-wise multiplication between the two rasters, Raster 1 and Raster 2. This means you multiply each corresponding pixel value from Raster 1 with its counterpart in Raster 2.
Raster 1 * Raster 2:
(7 * 5) (14 * 2)
(10 * 2) (36 * 5)
Resulting raster:
35 28
20 180
Step 2: Calculate the sum of all the pixel values in the resulting raster. In this case, you add up all the values in the resulting raster:
35 + 28 + 20 + 180 = 263
Therefore, the sum of all pixel values in the raster created using the map algebra expression [Raster 1] * [Raster 2] would be 263.