In this Python script we set up the script to import the spatial analyst extension and then used a weighted model based on a chosen criteria to asses the impacts of mining in Trempealeau County. It is important to note that while this script has all of the necessary elements, something in the script is incorrect and will not allow the script to run. The error that occurred stated that the listed rasters in the raster_name = arcpy.raster("Rasterfrom.gdb"), listed that the raster had no attribute data. After attempting some minor trouble shooting and digging around on a few web forums, I could not resolve the issue.
Post # 2 (4/12/2016)
F For the second Python Code we had to write we were attempting to automate a series of tools that would not only select fields based on SQL Query Statements, but create feature classes of those narrowed layers to select Frac Sand mines in Wisconsin that were not close to a rail network. This will be important because Frac Sand mines that are not close to rail networks will rely on roads to transport the sand to rail network locations, impacting the roadways and local infrastructure.
| Python Script for selecting mine locations based on the mines proximity to rail networks in the state of Wisconsin. |
Post # 1
GIS automation is extremely useful in its ability to quickly open a series of tools and execute those tools in a correct order, creating an end result much quicker than a user can via a graphical interface. Python is the programming language used for GIS automation due to the fact that it is relatively easy to understand and construct, with simple syntax. Another benefit to Python is similar to GIS systems itself, which is the attribute of being open source, and as such Python can be run on any operation system. The use of Python can make GIS processing quite easy as once the code is written, the code can be reused or reformatted for new situations with out starting from scratch. This semester we will begin to use Python to a greater extent to complete GIS projects.
Our first project was to download various data for the an area in and around Trempealeau County, Wisconsin, in order to continue our analysis of the impact of frac sand mining in western Wisconsin. After downloading some raster files our first task was to move all of the rasters into one folder and project them with python to one common projected coordinate system. Below is the code I wrote for this section of the project. Note that as this project is ongoing through out the semester Python code will continue to be added to this blog as more processes are completed.
No comments:
Post a Comment