Module 6 - Working with Rasters


For the final laboratory assignment of this course, I created a comprehensive raster image, consisting of five other raster images I had curated with specific conditions. The flowchart below demonstrates my steps for accomplishing this task, including checking-in/out the spatial analyst module, using the RemapValue, Raster, Slope, and Aspect functions, and saving my final raster image. These were all relatively new concepts for the course and I enjoyed using them to accomplish the goal of this assignment. My script output in the IDE included the print statements explaining what each step involved and the final raster matched the one included in the lab instructions, verifying the script ran successfully.

I had the most difficulty completing step 3e of the lab. This step involved slope and aspect calculations using map algebra. I struggled with naming all used variables in previous code and then formatting the syntax so that the code would run successfully. After consulting with various ESRI user platforms, I found that I had to run a calculation for both values of both the slope and aspect (that being, the minimum and maximum degrees). Upon doing this, I was able to understand how the code would execute properly and ensure that these values would both be utilized further on in the script. I had to ensure the < and > symbols matched accordingly to the minimum and maximum slopes and aspects for the output to be correct.

The indentation inside of the if-else statement was crucial in this script. With most of the script falling inside of the if statement, it was crucial that these lines were indented properly. Without doing so, the IDE would throw an error as the script would think the if statement was completely iterated through when it should not have been. Thus, I found it very important to ensure there were no extra spaces and that all lines of code inside of the if-else statement were equally indented.

After combining the rasters into the final raster output, it is necessary to save this final, comprehensive raster. Without doing so, it will exist as just a temporary raster. Saving this final raster is quick and simple, one must simply use the save method and select where they want this final, saved raster to go. Upon saving, I was able to open the final raster image within ArcGIS Pro to ensure it contained the valid results and that my script had actually run successfully.

Working with Rasters Script Flowchart


Working with Rasters Script Output