Posts

Showing posts from May, 2021

GIS Programming- Handling errors and debugging

Image
 This week we learned how to handle errors and debugging script in Python. The goal of this module was to learn how to deal with syntax errors and exceptions, manually debug, and use debugging tools. In the assignment, we were given 3 template scripts with errors. In the first two, we fixed the errors to allow the code to run correctly. Below are the final outputs and flowcharts for these scripts.  Script 1: The goal was to name the fields in a shapefile.             Script 2: The goal was to print the spatial reference of the project and then list the layers in the project.  In the final script (script 3), we were to ignore the errors and use a try-except statement to allow the script to run and produce an error message. As seen in section A's output, there is an error with the 'aprx_path' missing an argument. The try-except statement identifies this error and prints a message for the user. Part B is meant to provide the name, data source, a...

Intro to GIS Programming

Image
 This week the GIS programming course began. The objective for this week was to learn the fundamentals of Python coding. We were tasked with creating codes that include strings, lists, and while and for loops. The results of my code are below. It includes steps 1 through 4. Also included below, my workflows demonstrate my codes and process. Workflows: I have included my workflows for steps 1 through 4. Creating step 1 was easy because it utilized strings, lists, and the split function. In step 2, we were told to fix two errors. One of which was a lack of quotation marks around the print (p + "rolls a" + "dice" + "out of" str(x*2)). In step 3 we were instructed to create a while loop that created 20 random numbers that ranged from 0 to 10. I used the random integer function to create the random numbers, x was the counter variable, and my if and break statement stopped at 20. Looking at step 4 in more detail, I created a code that removed an unlucky variable...

3D Mapping

Image
 This was my final module of Computer Cartography. We learned about the future of GIS and 3D mapping techniques. We were assigned to create a map of Florida in Google Earth Pro. The map includes a shapefile with the surface bodies of water, dots representing population density, and county boundaries. The majority of the files were provided as-is to us, but we were asked to properly symbolize the bodies of water and convert the file to a KML file in ArcGIS Pro. I simply inserted the other map elements into google maps to create this current layout.