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.
No comments:
Post a Comment