Sunday, May 30, 2021

 GIS Programming Module 2

Module 2's objective was to introduce and practice debugging. The assignment for this module including going through and debugging 3 different scripts. 

Script 1

The first script that we had to debug was a simple script that prints out the fields of a provided shapefile. The debugging process or this script was fairly simple as can be seen in the flow chart below. 

The script simple needed a correction to the file path where it would draw data from and some errors related to either capitalization or missing letters. Below is a screenshot of the results from script after it was debugged. 

 


Script 2

The second script was intended to print out the files in a project. The second script contained various syntax errors and exceptions. The following flowchart shows the steps that I took to debug and run the script successfully. 



This script again contained a file path error along with missing characters and spelling errors. One missing character in the script created an exception by not being able to draw the necessary data from a loaded module. 

Script 3

The third and final script we worked on was intended to test our ability to find an error and add a Try and Except statement. The Try and Except statement allows the script to run while jumping over an area where their is an error present. This allows for isolation of an error. In this more complex script I used a debugger and ran the script line by line to ensure I caught all errors. 


In this last script we were not supposed to fix the error instead we had to use the Try and Except statement to isolate the error and ensure that the second part of the script ran as intended. 


Module 2 was very helpful as it made me look closer at scripts and get a better understanding as to how they work. Error messages in Spyder and IPython are helpful to quickly find some errors but more time and effort go into finding hidden errors that lead to exceptions. Some fairly small careless mistakes in code could be really problematic so it is really important to look over all your work.  






Sunday, May 23, 2021

 First assignment for GIS Programming (GIS 5103). The first assignment for this course was an introduction to python coding. We began by getting familiar with the Python applications and simple coding language and functions. After a few exercises to get familiar with our new environment we began to really get into the first part of the assignment. One of the simple tasks was to break down a string and then print a selected item, in this case my last name. 

The first more complex task of this weeks assignment was to fix some errors in a code that ran a dice game. Fixing the errors in the code was a fairly straightforward task as it only involved adding a random function and changing a couple syntax errors. 

The second major part of our assignment was more difficult and dealt with the creation of while loops. The first while loop we created appended random numbers into an empty list. Following the populating of a list with 20 random numbers between 1 and 10 we had to choose a number to remove from the list. Removing a number was accomplished with another while loop. After the remove function and while loop finished working a new list without our selected unlucky number was printed. 

Below is a screenshot of the output from all the code that was written in this assignment. 



 It was interesting to see how while loops and if statements could be used to carry out such diverse operations. This assignment was difficult as I had very little coding experience but after working through the assignment it started to make sense. At first I had to write out the operations I needed and determine what had to be coded and how things would relate. After a little practice I could anticipate what needed to written out. 

Saturday, May 1, 2021

 Module 7. Final mapping assignment of Computer Cartography. For module 7 we had to make a population density map in Google Earth. The population density map included the shapes of 23 southern Florida counties along with shapes for surface water features. In order to create the map in Google Earth first we had to convert layers in ArcPro into KML/KMZ files. The process of converting files in ArcPro is very simple, however you have to make sure that items such as symbology are good to go as you lose some abilities to change data in Google Earth. Getting data to display in google earth is simple. We added a pre-made legend in the form of a image file. The resulting map is not bad and I could see how it could be very useful when wanting to show varying levels of details or different views of an area of interest. Below is the dot density map created. 


The second part of this weeks assignment was to use the data displayed in the map above and put together a Google Earth tour of various cities within Southern Florida. Putting together a tour was fairly simple and could be pretty interesting. The imagery available in Google Earth could make for a really nice presentation. It was interesting to see the 3D elements such as buildings and trees. The most difficult part of putting together the tour was deciphering the file hierarchy in Google Earth. It took me a couple tries to figure out how to save things in order to create a tour that contained all the necessary data. I would like to practice some more in Google Earth particularly when it comes to moving around a scene. I tried to pan and move around to get different views during my tour however moving around with a mouse creates odd camera angles unless you are really steady. 

 This weeks assignment for module 6 had an objective of creating a isarithmic map of precipitation in the state of Washington. Isarithmic mapping is a common form of mapping used for presenting various types of smooth and continuous data using varying symbology. The map we produced in this module uses precipitation data derived using the Parameter-elevation Relationships on Independent Slopes Model (PRISM). PRISM contemplates a variety of factors which are interpolated to produce highly accurate climate data. The map also incorporated the creation of contour lines from the PRISM data. Hypsometric tinting was added in combination with contour lines to make a map with clear delineations that could easily be deciphered by a map reader. 

Data processing the lab itself involved using tools within the spatial analyst toolbox and classifying data to create easy to read and interpret divisions on the map. The PRISM process along with details on how the data was produced were included on the map. 

 


GIS 6005 Communicating GIS Final I have reached the final assignment of this course. This week we had to put all the skills that we learned ...