Python is a scripting language that allows easier automation of tasks in ArcGIS.
Scripts:
Script 1:
For lab 5 I created a python script that projected, clipped, and loaded a list of rasters into a geodatabase. I used a for loop to iterate through the list of rasters. After a raster was loaded, the script would determine the Datum of the rasters's projection, in order to decide whether or not a transformation was needed for the projection and apply the proper transformation.
Script 1 part 1 |
Script 1 part 2 |
For lab 7, some data preparation was needed before network analysis could be performed, necessitating a script. The script was to select mines based on the following criteria:
- The mine must be active
- The mine must not also be a rail loading station
- The mine cannot be within 1.5 km of the rail
After the mines were added to the geodatabase, the script analyzed rail terminals to eliminate rail to air terminals.
Script 2 Part 1 |
Script 2 Part 2 |
Script 2 Part 3 |
Script 3:
For lab 8 I wrote a python script to generate a weighted index model based on frac sand mine risk factors. One of the factors was to be multiplied by 1.5, so it would be taken into greater account when the model was being processed. The weighted factor was added with all of the other factors, then saved to the geodatabase.
Script 3 |
No comments:
Post a Comment