Sunday, June 5, 2022

GIS 4102 - Module 3 - Geoprocessing

 Geoprocessing is a framework and set of tools for processing geographic and related data. 

In this weeks module 3 for GIS programming we utilized python in conjunction with arcGIS pro in order to perform geoprocessing operations. We began by designing a model in arcGIS pro using the model viewer window. This model was designed in order to clip all soils to a basin layer, select all soils that are designated "not prime farmland", and erase the selected polygons from the clipped soil layer. The following is a screenshot of the model viewer displaying the workflow of the model process.

The result of this model was a shapefile named soil_clip_erase1.shp that displayed all soils within the basin area that are suitable for prime farming. The following is a screenshot of the output shapefile.


The next portion of the module involved designing a script that would add XY coordinates and a 1000m buffer to hospitals.shp while printing success messages, start time, date, and elapsed time. I was able to accomplish this once the workspace and the overwriting of geoprocessing options was established. Adding XY coordinates was a matter of running the acrpy functions copy_managment and addXYmanagment. Print statements were added to display correct success messages, start time, date, and elapsed time. Here is a screenshot of the console after successfully running the script.
And here is a screenshot of the hospitals_buffer.shp displaying the 1000m buffer around hospital locations. 

 
Some tricks I learned over the course of this module involved proper file referencing in both python and ArcGIS pro. Model building involved an understanding of geoprocessing tools such as clip, select and erase. The key to building a correct model was referencing the correct input and output shapefiles.When designing the script for python, proper file referencing and function placement was key in ensuring a proper functioning script. I opted to add elements such as a “/n” spacing command at the end of the getmessages command along with print statements referencing the shapefile being used as the workspace. These elements allowed for a better visualization of the processes occurring in python.

No comments:

Post a Comment

Spring 2023 semester wrap up

 The spring 2023 semester at UWF has been an eventful one in which I finalized the requirements for my bachelors of science in natural scien...