Monday, June 10, 2024

GIS Programming - Module 4 - Geoprocessing

In module 4 we were challenged with two different tasks that utilized skills we have gained over the past few weeks using ModelBuilder and Python to perform geoprocessing tasks. In the initial task we were asked to create a model and script tool using ModelBuilder. This model needed to accomplish three geoprocessing tasks. Using provided data this model needed to clip a provided soil shapefile to the parameters of a basin shapefile. Next it needed to select all soils that were classified as "Not prime farmland" using an SQL expression. Finally, it needed to erase the "Not prime farmland" soil selection from the basin polygon. The output of this model seen below shows soils suitable for farming.


Our second task was completed in Notebook within ArcGIS Pro. This consisted of writing a Python geoprocessing script that accomplished three tasks on a hospitals shapefile. The first task was to add XY coordinates to the shapefile which I accomplished using the arcpy.management.AddXY() tool. Second, a 1,000 meter buffer needed to be created around each hospital. I accomplished this by using the arcpy.analysis.Buffer() tool. The third and final task was to dissolve the individual buffers into a single feature. I used the arcpy.management.Dissolve() tool to accomplish this. Using the GetMessages() function our script needed to print messages from the tool after each of the three tasks. Below is a screenshot of my script output messages and my map showing the dissolved buffers.




Overall, I went into this lab feeling a little intimidated but it went much smoother than anticipated aside from a few minor hang ups. It is very interesting to learn how to utilize ModelBuilder and Python to accomplish tasks. I really liked the visual component of using ModelBuilder. It makes me think of how I could have utilized these skills while working on past assignments in the program. 

No comments:

Post a Comment

Special Topics in GIS - Module 6 - Scale Effect and Spatial Data Aggregation

The sixth and final module in Special Topics in GIS covered the topics of scale effect and spatial data aggregation. Understanding how we re...