The purpose of this week's lab assignment was to produce a composite raster from 5 intermediate rasters which were created using various aspects of the spatial analyst extension. After writing code to determine whether the spatial analyst extension was available, it was checked out, and the fun began. Three land cover classifications were assigned identical values; reclassification of the land cover raster was based on those new values. From the elevation raster four intermediate rasters were created based on slope and aspect values (slope between 5-20° and aspect between 150-270°). Finally, the five temporary rasters were combined into one raster which was saved, and the spatial analyst extension was checked in.
Final Raster Depicting Landcover Classification 1, Slope 5-20°, and Aspect 150-270° |
The main problem that I had with this particular script was that the outcome did not match the sample provided in the lab instructions. I had three colors in ArcMap instead of two. A big concern is that I would not have caught this error (since my script ran without trouble or messages) except that I was able to make this comparison and noticed the difference between my results and the lab instructions sample. The resolution of this issue turned out to be rather simple.
Because I remembered being confused by the inclusion of “NODATA” as a parameter in the reclassify portion of the lab exercise on p. 17 which is what I modeled my script on, I revisited that information in the text and learned that the 4th parameter is optional. I removed “NODATA” from my script, ran it again, and got the desired results, shown here.
With the completion of each lab, I am more impressed by what can be done in ArcMap with Python. I'm looking forward to the next lab!
No comments:
Post a Comment