Friday, July 18, 2014

Module 8: Working with Rasters

Final raster output that meets all criteria.
This week's lab involved working with rasters using the spatial analyst module in arcpy package.  Rasters allow for the display of continuous spatial phenomena and analysis using a GIS has made complex processes relatively simple.  The final lab output was a raster meeting three specific criteria.  These were: a specific landcover type, a slope between 5 - 20 degrees, and an aspect between 150 - 270 degrees.  The script written uses only DEM and landcover inputs.  At rights is a final raster output, below is a discussion of an issue that I encountered during the lab and how it was resolved.

1.     The only issue I had was that my final map displayed a raster with values of 1, 0, and NoData and thus looked different than the example shown on the assignment PDF.  Immediately I recognized that this was likely due to the landcover reclassification step.  The original script was as follows:

>>> outreclass = Reclassify("landcover", "VALUE", myremap, “NoData”)

2.       I investigated the Reclassify tool’s syntax through ArcMap help > Reclassify tool.
3.       “NoData” was displaying differently because I had specified it to do so in the script.  The final argument of how to represent NoData was optional, but I had entered it in.  The original script was copied from the Mod8 Exercise, this was the root of the problem.  In the Mod8 Exercise we purposely wanted to specify cells with NoData; however, in the Mod8 Assignment, we want to specify all cells that do not meet the criteria with a value of 0.
4.       Therefore, I removed the last, optional argument in the original script, creating the following final script, which ultimately produced the correct final raster:


>>> outreclass = Reclassify("landcover", "VALUE", myremap)

No comments:

Post a Comment