Wednesday, June 10, 2020

Geoprocessing

For this week's module, I used ModelBuilder and Python 3 to perform geoprocessing analysis. Through the geoprocessing pane, I created a toolbox and model to perform a clip, select, and erase model that erased all "not prime farmland" soil from the basin shapefile. I also had to write a geoprocessing script without the aid of a template.  Since I was creating my script in Spyder, I knew I had to set my workspace accordingly since it was a stand alone script. This meant I had to import arcpy, then from arcpy import env, and set the workspace. I created the rest of the script by following the stand alone guide on ArcGIS Pro Tool Reference page for XY Coordinates. I also had to create a 1000 meter buffer around the hospital shapefile and dissolve the buffers into a separate, single feature. This script was actually very easy to write because the exercise completely prepared me. I also think I am starting to understand some of the syntax to follow and what arcpy functions to use. It was pretty cool to explore the different ways to use Python and ArcPro to perform geoprocessing analysis. Below is an example of the script I wrote and the messages I had to print out.







No comments:

Post a Comment