Thursday, May 9, 2013

Python

Our last and final exercise was to use Python and write a script for our risk and suitability map. Our objective for our exercise was to write a script that created 5 buffers off of our mine locations, with each buffer increasing by 1000 meters. The script written can be seen in figure 1, which is a screenshot of the script itself and the actual running of the script.
Figure 1 is a screenshot of the script used in the Python exercise

The next I did was to create a graphic of the actual map itself. Using ArcMap, I created a graphic that showcases what the script actually did. 
Figure 2 is a map of the mines with a buffer around them.

Using Python was a neat exercise for me. It showed a way that one can run another tool is ArcMap, with having to find the tool, import all the files, and in this case having to run a buffer 5 times. This script was effective in the sense that once we set the loop for the buffer to run 5 times while adding 1000 meters each time, it saved a bunch of time that would have been used to re run the buffer tool. Python would have been effective have been effective in running tool for our risk and suitability map. Instead of having to find and run all the tools, a simple script would have saved time because you don't have to find the tools you can just type them in in the script. The problem with Python is that it is very specific in what it needs and you can lose time by making a simple mistake by not putting in a quotation mark or a period. These mistakes would cause a person to have to re run a tool or the simple interface of a tool would have cleaned up this mistake



No comments:

Post a Comment