Saturday, May 30, 2015

Lab 2 - Least-Cost Path and Corridor Analysis

In this week’s lab, we learned about least cost path analysis and corridor analysis using cost surfaces. The first part of the lab was an exercise in which we learned to create least-cost path analyses, using different weights on set criteria to determine the optimal path for a new pipeline. Then we were to perform a corridor analysis showing the potential movement of black bears between the two sections of Coronado National Forest, and to create a map of the latter corridor analysis.

In the first part, we were to create several least-cost path analyses using different settings. Our first criteria involved using the Slope tool on an elevation layer and reclassifying it, which we learned last week. We created cost distance and backlink rasters, both of which are needed to perform the least-cost analysis. In the second scenario, we added river crossings as an additional factor. Once the data was reclassified, we used the Raster Calculator to add the criteria together, and used this new cost surface to create a least-cost analysis. The third scenario expanded to cost to within a certain distance of a river, and we created a third least-cost analysis. To this point, we only created cost distances from the source; to create a corridor, we needed to create a cost distance from the destination as well, and use the Corridor tool to calculate an optimum corridor.

The second part of the lab was another corridor analysis. This time we were to show the potential movement of black bears between two sections of Coronado National Forest. I live not far up the road, so I know the geography, which was beneficial, as I could get a “feel” for the geographic region I was working with. The three criteria for the habitat corridor were the distance from roads, the elevation, and the type of land cover. We wanted our corridor to be a reasonable distance away from roads, black bears prefer mid-elevation areas, and they prefer specific types of forest and vegetation. I created a suitability model using those 3 criteria in a weighted overlay, the result of which was inverted to show that higher suitability describes lower travel cost. To obtain a meaningful corridor, I read the provided literature and tried a couple of different classifications to find a good threshold value. The map below shows three possible optimum corridors black bears could use to travel between the two sections of the Coronado National Forest.


Knowing a lot about the geography of the general area and where it’s sparsely populated also allowed me to find my corridor on a map and see that these do seem to be the optimum corridors based on the criteria. One note is that there were a lot of files created during the course of this lab, so I tried to make sure the names were as descriptive as possible to not get confused. This was sometimes difficult as we are often only allowed 13 characters for the file name lengths, but that usually wasn’t too bad. I had some trouble with the weighted overlay, and it took some time to find that it was weighting my classifications incorrectly, but troubleshooting problems is another way of learning. I really enjoyed learning about corridor analysis and I hope to get more practice using these techniques in the future.


Tuesday, May 26, 2015

Module 2 - Python Fundamentals Part I

In this module, we're still getting our feet wet with Python programming. We learned about string variables, methods and functions used to manipulate strings and lists, and how to perform basic math functions with Python.

After working through the weekly exercise which got us familiar with strings, lists, functions, and methods in Python, we began the assignment, which was just to write our first Python code. In this lab, we create a string of our full name, and then split that string into a list (First, Middle, Last). We used indexing to print our last name from the list. Then we had to assign a couple of variables. The first variable uses the len function to find the length of our last name, and the second variable multiplies the length variable by 3. When run successfully, the code should display our last name and the value that is three times the length of our last name.


As you can see, my last name contains 8 letters, and 8 *3 = 24, so the code executed correctly. I enjoyed working with the basics of Python and am interested in learning more. As someone familiar with FORTRAN, I can already say I am enjoying Python a lot more.

Monday, May 25, 2015

Lab 1 - Suitability Analysis

This was the first lab of the semester for Applications in GIS, and it was interesting to learn some new things about ArcMap and to use the tools to analyze information in a decision making process. In this lab, we carried out several suitability analyses in vector and raster, and the reading for the week helped out a lot as far as visualizing what we were doing. Before even starting the analysis, we first had to ask what our objective is. What are we trying to accomplish with this analysis? With that, we can decide what source data we need to accomplish that goal. Then we need to prepare the data to be used in suitability analysis. We created buffers if needed (i.e. within 1500 feet of streams or roads), and reclassified the data into a Boolean grid. Once this is done, we combined the criteria using the Union tool (for vector), and we were able to determine which areas met all the criteria for our suitability analysis.

The raster-based procedure isn't too different.We again need to gather our source data and reclassify the data into a Boolean grid. One difference is that instead of the Buffer tool used in the vector-based method, to get distances in the raster-based method we needed to use the Euclidean Distance tool, which I had not used before, but was rather simple to use. The distance from this tool is the shortest distance from the center of that cell to the closest source. To obtain a final output, we need to combine the Boolean rasters. The method used in this lab was to use the Raster Calculator, which uses map algebra to obtain the desired results. It can be a bit tricky, but I really like this tool and hope to work some more with it as we progress forward.

The third part of this lab was really interesting. It involved using weighted overlay to rate suitable locations. We reclassified data (on a 1-5 scale) based on how suitable it was (1 being least suitable, 5 being the most suitable). I think the most important part of the weighted overlay method would be to use the same scale for all data; otherwise the results would make no sense. Once the data was reclassified, we used the Weighted Overlay tool and added the 5 criteria. This tool is where we can change how much importance each criteria has. The first output that is on my map is the output where all 5 criteria are treated as equally important; all are set at 20%. The second output on the map is the output where the slope is treated as most important (40%), land cover and soils are treated the same as the first output (20%), and the distance from streams and roads less important (10%).

When comparing the two, we notice that there are more suitable areas near rivers and roads in the alternative weights scenario, which makes sense as we are not prioritizing that criteria as much in this scenario. Additionally, there is a broader area of less suitable areas in locations with steeper slopes. This lab really shows the difference between equal weights and alternative weights scenarios, and it shows the versatility ArcMap has to solve some more complex problems and to assist with the decision-making process.



Monday, May 18, 2015

Module 1 - Introduction to Python

This was our first week in GIS Programming, and the first assignment is mainly intended to get us used to the software and editors that we will be using to create Python scripts. Python is a programming language created in 1991 by Guido van Rossum and, as of version 10.0, is the primary scripting language used in ArcGIS. We were introduced to Python 2.7, including the PythonWIN editor and IDLE. We were also introduced to pseudocode, which is language similar to English that allows us to represent a program concisely.

Our main assignment this week was to run a script using PythonWin. The script creates folders for all 12 modules in our GIS Programming directory, as well as 3 folders with each module folder.  This was a rather simple task. I had an error the first time I attempted it as I had already created a folder for module 1, but removing that folder and rerunning the script easily fixed that error. Below is the screenshot of the folders that the script created. You can see all 12 module folders and on the right, the 3 folders within Module 1.