Question: rastor calculator 4. Raster Calculator (10 points) Write a raster calculator that can add OR subtract two rasters represented as nested lists. We will help
4. Raster Calculator (10 points) Write a raster calculator that can add OR subtract two rasters represented as nested lists. We will help you by creating the output raster in the function [ 1: myraster [[1,2,1,2),(3,4,3,4],[1,2,1,2],[3,4,3,4) 1 nyraster2 i 12,1,2,1),(4,3,4,3).(4,3,4,3,2,1,2,13 i Define which operation you want to apply . By commenting/uncommenting the operation operation operation" def raster_calculator (resteri, raster2, operation_string): output_raster. [10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,01 1 Insert your code here that modified output poster to the correct values bosed on the operation string The modified output rester will be returned and then printed out (see below) YOUR CODE HERE return output_raster output_raster raster_calculator(syrasteri, syraster2, operation) print("Output raster is", output_raster)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
