Friday, May 10, 2013

Using Python to Assist in Geoprocessing

The focus of this assignment was to gain some experience using Python to run some geoprocessing operations.  One of the benefits of using Python is the ability to create scripts that automate geoprocessing operations.  In this exercise, a iterative feedback loop script was written to automatically create five 1,000 meter buffers around the locations of sand frac mines in Wisconsin.  The script was written by first setting the workspace, followed by specifying the buffer distance.  A while loop was then added and the buffer tool was set to run a total of five times.  The script that was used to run the operation is seen in Figure 1, and the resulting map is displayed in Figure 2.
Figure 1. Python Script
Figure 2. Map of Mine Locations with Buffers
As previously mentioned, Python scripts can be used to automate different operations.  This can effectively cut down on time spent running different tools.  In the previous assignment regarding raster analysis, the Euclidean Distance tool was run on multiple datasets.  A script that automated that process and ran the tool on each dataset would have saved a lot of time.

No comments:

Post a Comment