Thursday, May 29, 2014

Module 2: Geoprocessing

This weeks assignment involved becoming familiar with model builder in ArcMap and scripting in PythonWin.  We were required to build a model which automatically ran a series of sequential steps and produced a desired output.  The input features were a polygon feature class of different soils (soils.shp) in a particular region and a polygon feature delineating a specific area of interest (basin.shp).  The steps were to first clip the soils feature to the basins feature, then to select those soils not suitable for farming, and finally to delete those soils not suitable for farming, thus producing a feature class of areas within the basin that had soil suitable for farming.

Above is the output of my model, and below the steps I followed for model completion:

1.       Right-clicked on Mod2_PCoppola.tbx, then from the drop down menu selected New > Model.
2.       By dragging-and-dropping from the ArcCatalog window in ArcMap, I added basin.shp and soils.shp to the model builder window.  I added the Clip tool the same way, but from the ArcToolbox > Analysis > Extract window.
3.       Doubled-clicked on the Clip tool within model builder window and added soils (blue recycle symbol) as the input feature and basin (blue recycle symbol) at the clipping feature.  I named the output feature class soils_basin.shp.  Clicked Auto layout and zoom extent to better visualize the model.
4.      Dragged and dropped the Select tool into the model builder window.  Double-clicked it to set parameters: Input feature = soils_basin; SQL was set to FARMLNDCL = 'Not prime farmland'; the output feature class was soils_notprime.shp.
5.      Dragged and dropped the Erase tool into the model builder window.  Double-clicked it to set the parameters: Input feature = soils_basin; Erase features = soils_notprime; output feature class = soils_prime.shp.
6.      Clicked auto layout and zoom extent, then saved the model as name = SoilErase; label = Prime Farmland Locator.

7.      I set each input parameter to a “model parameters” by right-clicking them and checking Model Parameter.

No comments:

Post a Comment