Tuesday, June 16, 2015

Module 5 - Geoprocessing in ArcGIS

This lab was about geoprocessing in ArcGIS. In it, we learned to create a toolbox, and how to create tools using ModelBuilder and scripts tools. We also learned to export scripts from ModelBuilder. We also learned how to update a script derived from a model so that it will work on its own.
This module was really interesting to me because I have wanted more practice with ModelBuilder since we were introduced to it last semester. I created a new toolbox, which was a pretty straightforward process in ArcCatalog. Inside the toolbox , I created a new model, the end product of which would contain the soils within a basin not classified as “not prime farmland.” The model uses the clip, select, and erase tools to accomplish this.
I set all the input and output variables as model parameters. This allows us to change the input features, output name, or filepath if we choose. One thing to note, which I feel is pretty easy to forget, is that all the input features need to be added to the current document for the model and script tools to work properly. We exported the model as a Python script. This is really useful as now a lot of the scripting is done for us. But there was still some to do to allow the script to work as a stand-alone script. To do this, all we really needed to change in this case was to explicitly define the full file path of the layers we were working with. It’s also important to allow Arc to overwrite the output, or there will be an error and the script will not run. Using this process, I created a shapefile showing the soils not classified as “not prime farmland.” A screenshot of the shapefile is below.



Next we learned how to share a toolbox. I selected both the toolbox and the scripts folder and sent them to a new zipped folder.

This lab, while not very long, was very informative and full of useful material. I really liked how easy it was to export the model to a script, and to create the model itself. I also really liked how complete the script was; it even had some comments to describe what the script was doing. I learned quite a bit in this lab and hope to work with some of this in the future.

No comments:

Post a Comment