Monday, June 19, 2017

Programming Module 5 - Geoprocessing

In this week’s lab, we learned how to create models and how to convert those models into scripts that can run in both ArcMap and in PythonWin.  We also worked through the process to create a toolbox with tools.  Specifically, we created a script that contained several tools to eliminate non prime farmland (as identified from a separate soils layer) from a basin layer. 

The flowchart visually steps through the process of creating the layer that contains the non prime farmland erased from the basin.  First, from within the ModelBuilder in ArcMap, I added the basin and soils shapefiles and the clip tool.  Using the connect tool, I drew an arrow between soils.shp (input feature) to the clip tool and between the basin.shp (clip feature) and the clip tool.  After adding the select tool, I connected the output from the clip tool and the select tool using the expression FARMLNDCL = “Not prime farmland” and the clipped soils shapefile.  I then added the erase tool and connected the new Not_Frmlnd.shp (erase feature) and the basin.shp (input feature).  The Erase_Soils shapefile was then created.  After each tool was added, I ran the model to make sure everything had been set up successfully.

No comments:

Post a Comment