Monday, March 16, 2015

Python Scripts

Python Script is a from of computer code that can be used to translate commands onto ArcGIS. It can be difficult to learn, but it is another language that can be useful in working with GIS. With it you can buffer, erase, and even intersect just by writing a simple script. In this instance, for Ex.5, I used Python to project, clip, and put different rasters into a geodatabase. The geodatabase is for Trempealeau Country and the purpose for the whole project is to figure out how sand mining in that area is effecting the environment. The letters in green tell the steps and the rows of words below them are the actual commands.
 
 
LAB 7
 
 
For this script we needed to take all the sand mines and separate the ones that don't have a rail line attached to the mine. I had to set up variables and a couple SQLs to help create a new feature layer. Using the script I was able to create a feature layer that shows the mines with no rail lines. Some problems I ran into were the silly errors like misspelling words or not capitalizing certain letters. After I fixed these errors the script ran fine. I went into ArcMap to make sure the layer worked and it did perfectly. The number of mines I had was 41 mines.
 
 
 
 
 
 
 
Lab 8
 
 


 
 
 
 
 
This script takes in all of the risk models created in ArcMap and creates a weighted risk model. The figure below shows the completed script when is done running.
 

 
 
 
 
 
 
 
 
 
 
 


No comments:

Post a Comment