Wednesday, June 12, 2019

GIS Programming - Module 4 Lab

Python 3.6.6 |Anaconda, Inc.| (default, Jun 28 2018, 11:27:44) [MSC v.1900 64 bit (AMD64)] on win32

>>> print ("Hello Everyone!") 

Hello Everyone!

This weeks lab focuses on using geoprocessing tools through two streamlined methods: Model Builder in ArcGIS Pro, and Python Scripting through Spyder. For this lab, I was tasked with creating two projects. The first project was to determine suitable farmland in a study area using Model Builder. To accomplish this task, I first clipped the soil data to my basin (study area). I then selected all soil features that were not suitable for farming based on an attribute value. Finally, I used the erase tool to erase the features in my soil data that were not suitable for farming. It is essential to know that Model Builder provides a means for users to string together multiple tools and allows them to bypass running each tool individually. My results (below) show that the soil features not suitable for farming were removed.


Initial Clipping

Final Results With Unusable Soils Removed

The second part of the lab required me to run various geoprocessing tools in the Python environment. For this project, I was tasked with three primary objectives. I first had to add XY Coordinate data to a shapefile containing hospital data. I then had to add a 1000 meter buffer around the hospital features. Finally, I had to dissolve the buffers in the new hospital shapefile to create one feature. This portion of my project was all completed in Spyder. The results below show that each tool function of my script ran successfully and with the addition of the GetMessage() function, I was able to print the run-time messages after each portion was run.


No comments:

Post a Comment