GIS5103 Module 4: Geoprocessing
It's crazy, but I think I had the biggest "A-ha!" moment this week while scripting in this week's lab. It felt like such a lightbulb moment when I realized I was really comprehending the script as I built it from the ground up. Honestly, over the past couple of weeks, I've been reviewing the scripts we maintain at work, and they make more sense than they did when I was learning Python early in my GIS career. As straightforward and obvious as it is, it's funny how, when you actually dedicate time and focus on something, things begin to fall into place and click oh-so-satisfyingly.
This week's module focused on all things geoprocessing! I'm very familiar with the tools specified in this lab, including Clip, Erase, Add XY, and Buffer. It made me feel right at home, which was pleasant.
The first half of the lab required us to work in Model Builder, which is integrated in ArcGIS Pro. It's a very user-friendly way to run these geoprocessing and analysis tools one after another and order them as desired. The model made us clip the soils layer (polygon features) to a basin layer (polygon features). Then, we had to select specific soils based on an attribute, which was then used to erase or remove parts of the basin layer. That left us with this final version of the basin features, as shown below, as well as the different soil features based on Clip and Select.
| Soil Erase Model - Step 1: Result of Clipping the Soil polygons to the Basin polygon. |
| Soil Erase Model - Step 2: Result of Select on Soil polygons, having only Soils classified as "Not prime farmland". |
| Soil Erase Model - Step 3: Results for basin features with erased areas where the Soil features are classified as "Not farmland". |
| Soil Erase Model. Uses both the soils and basin shapefiles as input features. Clip, Select, and Erase tools were used. Created output shapefiles each step. |
The second part of the geoprocessing lab required us to create a script in Notebook, all from scratch! This one was the most daunting so far, but I had the most fun tweaking things and making the script my own. It felt so satisfying to run it as well and see it work!
This script in Notebook was on the hospitals features. We had to take the hospitals shapefile, run the Add XY coordinates tool, create a 1000-meter buffer, dissolve it, and print the GetMessages() function to show that the tool ran successfully. Here's where it really came together for me, noticing how much easier scripting became and also how fun!
| Notebook Script Flowchart. |
| Notebook Script Results: Closer view on the dissolved 1000-meter buffer and the results block showing a successful execution of the script. |
Upon completing this lab, it makes me even that more excited and motivated to dive into some Python scripting to automate some workflows that I've been itching to do for quite some time but I've been too busy to do so. Also, maybe some potential for capstone projects? I know, it's further down the line, but I'm already bubbling with ideas! Here's hoping!
Comments
Post a Comment