Friday, May 29, 2015

Module 2 - Python Fundamentals Part 1


This week we created a basic script, the end of result of which shows my last name and the number of letters in my last name times three.

To write the script I first had to define what my name was... this then was split into a list. From this I was then able to separate out my last name, and derive the total count of letters in my last name using the len function. Once I had this information I was able to write a statement multiplying the total last name letter count - the results of which you can see below.

The script, while short, was really the result of several false starts. After reviewing the textbook and the lab exercise several times I was able to finally produce something that should work with names other than mine, and can actually be run in PythonWin. This was quite the learning experience, and I am very happy with my results.
Screenshot of script results.





























Monday, May 25, 2015

Lab 1 - Suitability Analysis

The first official lab of the class involved running suitability analysis models. First we focused on simple Boolean analysis (models that answer yes/no type questions), then we covered weighted overlays (applying a ranking to possible suitability results).

Two weighted overlay results.

Discussion

The above map shows the results of two different weighted overlay results. Both maps were derived from the same input data (ranked highway, river, slope, soil, and landcover type) but the overall importance each dataset was weighted differently using the Weighted Overlay tool. The map on the left shows the model results if all criteria are given the same weight (in this case, each criteria weighted 20% out of 100), and the map on the right shows the results where some criteria (such as slope at 40%) are given more weight than others (such as roads at 10%).

As you can see, with the variable weight scenario map on the right the resulting classes were not enough to fill all 5 categories. What the category range means is that areas classed as being 1 are least suited (in terms of the overall criteria and their given weights) and areas classed as being 5 are most suited. Under the alternative scenario the best results are average suitable locations only.

Quite a bit of data processing went into the production of the above maps. The above maps show raster data, not vector data - so those layers that were shapefiles were converted using Euclidean Distance, then reclassified to show the desired number of classes/rankings. The raster data was also reclassified the same way.

A benefit of the weighted overlay over simple Boolean analysis is that one can see the shades of gray within the data... although as shown on the map above, it does matter how you initially class and rank your data. The results of a Boolean analysis are very easy to interpret but weighted overlays are a whole other beast - the above results are a bit trickier to understand, and a solid methodology is required to make sense of it all.

Sunday, May 17, 2015

Module 1 - Introducing Python

This blog submission marks the start of a new semester and a new class within the UWF GIS Certificate program! For the first module in GIS Programming we ran a Python script.

The purpose of the script was to set up all our folders and sub-folders for the semester, which it did in the blink of an eye. I had double-clicked on the script which ran it immediately - that was something of a mistake on my part, as I had meant to only open the file for viewing/editing. Oops. The script results are shown below.

What scripting can do for you - above is the Module 1 script results.
Once I opened the script I observed some variables I was able to understand right away (like "import os" or "course folder = [location for folders]"). Others, like "def createPath (path):" I'm not so sure on... but I can hazard a guess as to what that's getting at (and that probably is a definition of some kind). The formatting of the script is also a bit more complex than the pseudocode examples we had played around with in the lecture part of the class.

Overall this looks to be an interesting course - I've already picked up little knowledge nuggets, and I'm pleasantly surprised at how seemingly easy scripting can be.