Working with rasters
This week was learned how to work with rasters in Python. Our assignment was to write a script that created a raster that identifies areas where the landcover, slope, and aspect meet specific parameters. I began writing this script by importing the arcpy spatial analyst module and all of the functions. Next, I began an if statement that contained the majority of my script. It begins with a conditional statement and notifies the user if the spatial analyst module is available. If it is not, then the else statement tells the user that the license is not available. The if statement checks the spatial analyst module out and in. Next, it reclassifies the land cover. Then, it calculates the desired slope and aspect. It then combined all of these rasters into one final raster and saves it as a tif file. The final output is included below.