Wednesday, April 26, 2023

Spring 2023 semester wrap up

 The spring 2023 semester at UWF has been an eventful one in which I finalized the requirements for my bachelors of science in natural science. Two courses that I have taken this semester have been Community Engagement (EVR4039) & Coastal Morphology (GEO4221). While these two courses were not necessarily GIS courses they both incorporated themes and elements that definitely resonated with GIS. In Community Engagement we developed and distributed a community awareness survey involving streambank erosion through a web-based survey platform known as Qualtrics. The goal of the survey was to assess Escambia county resident's knowledge and awareness on a number of topics involving streambank erosion in hopes to establish a framework for future decision and policy makers in implementing future streambank erosion prevention strategies. We presented our survey project as a poster presentation at the student scholar symposium and were awarded the Best Research (with faculty) Project award at the High-Impact Practice Faculty showcase.



For my final project in Coastal Morphology I wrote a literature review that covered the progression of GIS in the field of coastal morphology. The paper covered predecessors to GIS, it's inception, present applications and trends, and future predictions.

The Progression of GIS in the Field of Coastal Morphology



Tuesday, June 28, 2022

GIS 4102 - Module 6 - Working with Rasters

The final module for GIS programming has come to a conclusion. Module 6 had us working with rasters in order to produce an ouput that reflected map algebra calculations involving slope and aspect. The requirements for the final output were to create a raster that incorporated these elements:
• Forest landcover (classifications 41, 42, and 43)
• Slope between 5° and 20°
• Aspect between 150° and 270°

Here is a screenshot of the final raster.


And here is a screenshot of the Spyder console successfully running the script.

Here is the psuedocode for my script.
START
Import modules
Enable overwrite output setting
Set workspace to Elevation fGDB
Set output env
Create mod6 fGDB
Print mod6 fGDB completion statement
Create if conditional statement for script to run only if spatial analyst is available
     Check out spatial analyst extension
     Remap value function to assign landcover classifications 41, 42 and 43 all as new value of 1
     Reclassify tool on landcover raster using Remap variable
     Save reclassify raster
     Print reclassify completion statement
     Assign elevation raster variable
     Create variable for slope based on elevation, and percent rise field
     Create variable for aspect based on elevation field
     Create temp variable for slope1 condition >= 5
     Create temp variable for slope2 condition <= 20
     Create temp variable for aspect1 condition >= 150
     Create temp variable for aspect2 condition <= 270
     Combine 5 temp rasters into 1 final raster using boolean and map algebra operator (&)
     Save function direct final_raster.tiff
     Print combination completion statement
Create else condition if spatial analyst is not available
     Print Spatial Analyst is not available statement
END

Some problems I encountered over the course of this module involved correctly importing the spatial analyst module, syntax errors, and assigning variables to conditions involved in the slope and aspect functions. For the spatial analyst module I opted to use the import arcpy.sa code to import the spatial analyst module and for every sa function I included arcpy.sa in the script such as this example for the reclassify tool:  arcpy.sa.Reclassify. General syntax errors I ran into during this module mainly stemmed from when I had to copy bits of code from previous modules. I have learned over the course of these modules that observation of correct filepathing is essential to create a functioning script. Updating filepathing from mod5 to mod6 was necessary for correcting a filepathing error for the file GDB creation that I kept running into. The last major problem I had to deal with was assigning the variables in order to perform slope and aspect calculations using map algebra. The instructions called for the final value to be between two values thus two temp variables were needed: one greater than low value and one less than high value. This involved the creation of two variables for slope (s1 & s2) and two variables for aspect (a1 & a2). The values were determined via values obtained from the instructions. The result of this calculation was five temp rasters that were combined into one final raster using the Boolean And map algebra operator (&). The final raster was saved via the .save function. 

Over the course of this final assignment I found myself referencing past modules to grab sections of code needed for this module. In my future GIS programming endeavors I plan to create a script template that incorporates elements that have been enforced over the course of this class such as including  comment information such as name, date, description, etc and also including common modules imported. 


Tuesday, June 21, 2022

GIS 4102 - Module 5 - Geometries

The second to last module for my GIS programming course has been completed and I can safely say that I now have a better understanding of how to reference geometric data in python. This weeks module 5 tasked us with creating a script that could write 5 specified values for each reference point of the rivers.shp shapefile. The following is my psuedo script that walks you through the processes of each line of code. 

START
Import modules
Set workplace
Set output location
Enable overwrite output setting
Define feature class variable
Open .txt file and enable writing
Create search cursor to call on OID, SHAPE, and NAME fields
Start a for loop to iterate through each row in the cursor
        Define variable to act as vertex ID number
        Print row being referenced as “Feature #:”
        Start nested for loop to iterate each part being referenced
                  Print part being referenced as “Part #:”
                  Start nested for loop to iterate each point in part being referenced
                            Print row information pertaining to X and Y coordinate data
                            Add one value to vertex ID
                   Write method to add the five values:
Feature OID, Vertex ID, X coordinate, Y coordinate, Name of
                     the river feature
to .txt file
                    Print the five values:
Feature OID, Vertex ID, X coordinate, Y coordinate, Name of the river
                     feature
Close the .txt file
Delete the row variables outside of the for loops
Delete the cursor variables outside of the for loops
END

Here is a screenshot of the rivers_atg6.txt file after the write function had been completed, along with the console successfully showing the script ran in spyder.


Some issues I encountered over the course of this module involved referencing field values, indenting nested for loops, and referencing rows. The first problem I ran into was a simple fix but took quite some time to identify. While I was using correct syntax to create the search cursor I did not realize that the NAME field did not require an @ symbol due to it being a text related field and due to it not containing any geometry to be referenced the @ symbol was not necessary. Once this issue was sorted and all of the fields or columns were being referenced correctly I ran into my second and third problems, indenting my nested for loops and referencing rows correctly. After reviewing the module instructions and exercise information I opted to nest my for loops in a way that iterates the rows being referenced and defines the point variables for X and Y coordinates allowing the write and print functions to work correctly how I have them written. The result was print statements in the spyder console for each feature being referenced (OID), each part of the feature being referenced (vertexID), each X and Y coordinate for the feature (X,Y), and the feature name (NAME).


Tuesday, June 14, 2022

GIS 4102 - Module 4 - Exploring & Manipulating Spatial Data using Python

 Module 4 for GIS programming involved creating a script in Spyder using Python. The script created a geodatabase called atg6.gdb, copied features from a data folder to the fGDB, used a search cursor to find the Name, Population, and Feature of all cities listed as county seat in the cities shapefile and created a dictionary that populated with the name and populations of each 'County Seat' city. The following is a screen shot of the console running the script with completion print messages.

Some problems that I encountered involved creating the file geodatabase. My issues were resolved by correctly setting the output environment. I corrected this through fixing syntax errors in the following line of code: arcpy.CreateFileGDB_management(outputEnv, "atg6.gdb")

Creating the for loop to copy files from the data folder to the fGDB was another problem I encountered. I corrected this error by adding a description statement that allowed all items in the fc list to be described by their base names. This allowed the script to search the features without file extensions and allowed them to be copied to the fGDB. Getting the search cursor to work correctly was another problem encountered. I ultimately reconciled this portion of the assignment by separating each field into individual variables field = “NAME”, field2 = “FEATURE”, field3 = “POP_2000”.  The feature class portion of the script was also not detecting the cities shapefile in the fGDB. I made it recognize the file by adding the .shp file extension to the end of the cities feature class so the line of code looks like this: fc = “cities.shp”.

Something I found useful used in this module and past modules was the arcpy.Getmessages function and I will have to remember these functions for future projects in order to display a “Succeeded at <date and time> (Elapsed time: <____> seconds)” message.
Beginning
count = arcpy.GetMessageCount()
After each print statement process
print (arcpy.GetMessage(count-1))


Sunday, June 5, 2022

GIS 4102 - Module 3 - Geoprocessing

 Geoprocessing is a framework and set of tools for processing geographic and related data. 

In this weeks module 3 for GIS programming we utilized python in conjunction with arcGIS pro in order to perform geoprocessing operations. We began by designing a model in arcGIS pro using the model viewer window. This model was designed in order to clip all soils to a basin layer, select all soils that are designated "not prime farmland", and erase the selected polygons from the clipped soil layer. The following is a screenshot of the model viewer displaying the workflow of the model process.

The result of this model was a shapefile named soil_clip_erase1.shp that displayed all soils within the basin area that are suitable for prime farming. The following is a screenshot of the output shapefile.


The next portion of the module involved designing a script that would add XY coordinates and a 1000m buffer to hospitals.shp while printing success messages, start time, date, and elapsed time. I was able to accomplish this once the workspace and the overwriting of geoprocessing options was established. Adding XY coordinates was a matter of running the acrpy functions copy_managment and addXYmanagment. Print statements were added to display correct success messages, start time, date, and elapsed time. Here is a screenshot of the console after successfully running the script.
And here is a screenshot of the hospitals_buffer.shp displaying the 1000m buffer around hospital locations. 

 
Some tricks I learned over the course of this module involved proper file referencing in both python and ArcGIS pro. Model building involved an understanding of geoprocessing tools such as clip, select and erase. The key to building a correct model was referencing the correct input and output shapefiles.When designing the script for python, proper file referencing and function placement was key in ensuring a proper functioning script. I opted to add elements such as a “/n” spacing command at the end of the getmessages command along with print statements referencing the shapefile being used as the workspace. These elements allowed for a better visualization of the processes occurring in python.

Sunday, May 29, 2022

GIS 4102 - Module 2 - Debug/Error Handling

 For this weeks module 2 we were tasked with analyzing three provided scripts and troubleshooting them in order to locate and fix errors. Errors present themselves in python when the program compiler detects syntax errors that interfere with the script from running. The error message display indicates the syntax error that occurred. Checking for errors in python is relatively straightforward. Syntax can be quickly checked by looking at the code analysis on the left side of the code for error ! symbols. Syntax can also be quickly checked by running the script and observing the console results. Another final way syntax can be checked is by quickly running the debugger located on the spyder toolbar.

The first part of the assignment involved editing file-path and capitalization errors in script 1 in order to run a script that displays the names of  all fields  on  the  Module2/Data/parks.shp  attribute  table. Here is a screenshot of the spyder console successfully running the script.

The second part of the assignment also involved correcting file-paths, spelling errors, and functions. Once all errors were correct the script printed the names of all layers in the project file, TravisCountyAustinTX.aprx. Here is a screenshot of the spyder console successfully running the script.


The final part of the assignment involved successfully implementing a try-except statement. I added a try-except statement in the following places of the code in order to allow the script to run and print an error message. Adding the try statement to line 12 and the except statement to line 24 incorporated the bulk of the code where the error occurred. The except statement indicated the error message by print displaying the error statement, “The error is '__init__() missing 1 required positional argument: 'aprx_path''. After correcting another file-path error in part B the entire script was able to run error free. The result of the script displays the prints of part A indicating the try-except statement and the results of part B indicating name, data source, and the spatial reference of  each layer in the project file. Here is another screenshot of the spyder console successfully running parts A & B of the script.


Monday, May 23, 2022

GIS 4102 - Module 1 - Python basics

 For the summer semester of 2022 I have enrolled in GIS 4102 to better understand the ins and outs of programming in GIS. We began interacting with python code in the IDE spyder. This software allows us to visualize and edit the code directly. Our first task was to run a provided script that creates all of the folders that we will be using throughout the semester directly into the designated S drive. After establishing the folders the assignment could begin. Opening the module template revealed some provided code. The first step of the assignment involved creating a string that involved our full name and then splitting that string into individual names. Using indexing I used a print function to display only my last name. The next step of the assignment was to correct two errors present in the provided dice game code. This was where I ran into my first hurdle. The first error was simple, correct the case of the x variable, the second error was tricky. I finally figured out that string values can only be added to other string values and not integers + strings which was the situation I had going on.The next steps involved creating a random generated list of twenty integers, 0-10, that when generated detects for an unlucky number. If this unlucky number is detected the number is removed and a print statement indicates how many times the unlucky number was removed. If the unlucky number is not detected a print statement indicates that the unlucky number was not in the list. These steps of the module took the longest. I ran into another issue involving correct parentheses usage that was solved after thorough contemplation and help from the UWF GIS youtube channel. Going forward this module has equipped me with the basic knowledge to read, understand, and interact with python coding. Paying close attention to syntax is key to achieving success in programming. 

Here is a screenshot of the full script ran from the sypder console.


Tuesday, April 30, 2019

GIS 4006 - Final Project - Lithography and Rivers in Escambia County, Fl

For the Final Project in Introduction to Cartography we were tasked with creating a bivariate map that displays two thematic datasets over one geographic region. I chose to create a map of Escambia County, Florida that compares lithography areas for Escambia County and major river lengths for Florida. The main purpose of this map is to assess for any correlations that may arise between the two thematic datasets when compared visually. The secondary purpose of this map was to uniquely identify and symbolize lithography types for the entirety of the state of Florida. Through the combination of two thematic mapping techniques, chloropleth mapping and graduate symbol mapping, a bivariate map was created.

A chloropleth mapping technique was used to cartographically represent the lengths of major rivers that flow through the state of Florida as a color gradient with indigo colored segments representing a low length in meters and violet colored segments representing a high length in meters. This data was classified into six classes utilizing the natural breaks (jenk) method as this gave the best and most even distribution of data.  This thematic method can be seen applied throughout the entirety of the state of Florida, and across all of Florida’s rivers. A graduated symbol mapping technique was used to cartographically represent the areas of lithographic rock located beneath the topsoil of Escambia County, Florida. This data was classified into 4 classes utilizing the natural breaks (jenk) method as this gave the best and most even distribution of data. This thematic method was restricted to Escambia County only because the size of the graduated circle symbols would have overcrowded the portion of the map showing the entirety of Florida State.

Correlations between Escambia County lithography data and Florida major river data were mapped, assessed, and discussed over the course of this project. Lithography percentages were derived from attribute table data supplied by the USGS and Major River data lengths were derived from attribute table data supplied by UWF. By adhering to Gestalt’s principles of design and ensuring all essential map elements are present and accounted for this bivariate map was created that shows Escambia County lithographic areas represented as graduated symbols and Florida major river lengths represented as a chloropleth color gradient. 



Sunday, April 14, 2019

GIS 4006 - Module 12 - Neocartography & Google Earth

For this weeks module 12 we were tasked with utilizing our map deliverable created in module 10, the population dot density map of South Florida, and uploading it into Google Earth. This module was completed using ArcGIS Pro and Google Earth Pro. Layers were converted in arcgis pro using the layer to KML tool. I was able to convert my dot density layer after converting it to to a a single point layer by regenerating a new set of random points based on a newly calculated population field of one dot representing 20,000 individuals. Legend elements and extent frame were sniped using windows sniping tool and uploaded into Google Earth Pro as image overlay elements. A tour was created that visits the following place markers in South Florida with the 3D buildings feature enabled: Miami Metropolitan, Miami Downtown, Fort Lauderdale, Tampa Bay, Saint Petersberg, and Tampa Downtown.

A discussion post was made by me in regards to the future of GIS and volunteered graphic information.
GIS as a science is continuously evolving as more and more users become active participants in GIS data gathering techniques. One of such techniques is volunteered graphic information, VGI. This geospatial data is being uploaded by an enormous amount of people via the internet at an ever increasing rate. I personally am a fan of VGI and any improvements in general to GIS sciences and applications but it must be noted that VGI comes with some drawbacks, such as data integrity. Some work arounds to inaccurate public data could involve an administrative review or peer review process. I could see a system that implemented a ranking system based on data quality being a good source of VGI content.



Saturday, April 6, 2019

GIS 4006 - Module 11 - 3D Mapping

This weeks module 11 had us mastering the art of 3 dimension feature creation utilizing Arcgis Pro and then transferring data into Google Earth Pro.
The first part of this module involved completing a 3d Visualization Using ArcGIS Pro course on ESRI's website. This training course gave a great overview of 3d mapping basics and walked me through three exercises involving: Craterlake, Oregon , Downtown San Diego with extrusions rendered as non realistic and realistic from different view points.








A Boston buildings feature file was then extruded to have elevation values. This was achieved by generating random points within the building shapefile (34,300 points), adding surface (elevation) information to those points, and summarizing per building (100 points per
building, 343 buildings). This generated a 3d feautre scene of the cityscape of Boston that was saved as a KMZ file and uploaded into Google Earth Pro.

Importing 3d layers into Google Earth has many useful applications but two that come to mind would be construction projects and delivery routes for businesses. Utilizing Arcgis pro to convert 3d scene features to KMZ files and uploading them into Google Earth would be an easy way to get information out to potential clients or customers that do not have access to gis specific software, such as arcgis pro. Google earth is accessible by anyone for free and has a much simpler user interface learning curve when compared to arcgis applications.


Finally a comparison of Charles Joseph Minard's map-graph was conducted on the original and a 3d representation of Napoleon's march to Moscow. The original shows the decreasing size of the Grande Armée as it marches to Moscow using a clever use of mapping techniques to not only show a geographic representation of where Napoleons army marched to, from Kowno to Moscow, but it also shows a symbolic representation of the size of the army through the use of diminishing weight. When viewed in 2d and 3d these elements are apparent, but 3d presents this information in a more dramatic way. Giving the army route a Z value allows a user to view the decline of Napoleon’s army in weight thickness and in depth, all from a birds eye view. The 3d map definitely pulls off an effective theme but it should be noted that the 2d map presents a far more legible account with more details, such as river names, city names, and temperature all being visible at a glance. I personally prefer the original 2d map by Minard.





Sunday, March 31, 2019

GIS 4006 - Module 10 - Dot Mapping

For this weeks module 10 we were tasked with creating a dot density map of South Florida based on information supplied by the U.S. Census Bureau. Dot density mapping involves the use of dots as symbols to identify one or more occurrences. In the case of my map 1 dot is equivalent to 20,000 people. The number of dots change in proportion equivalent to the population field in the supplied census data excel file.

The major advantage of dot mapping is that it is an intuitive concept that a viewer with no map experience can comprehend. A quick glance at the legend to confirm the dot symbol representation and a viewer can see on the map where dots are grouped closely and where they are spread apart. These areas would intuitively register as high and low population areas to an individual with no mapping experience. Another advantage is that dot mapping shows how land is used. In the case of a population map high concentrations of dots indicate a highly populated.

Disadvantages to dot mapping would involve the appearance of the dots themselves. Dots that are weighted to low would barely be visible and dots weighted to high would overlap and obscure. Dots can also be misunderstood if a viewer does not acknowledge the legend. A single dot could be understood as being equivalent to a single person in the case of a population dot density map like in this module.



Saturday, March 23, 2019

GIS 4006 - Module 9 - Flowline Mapping

For this weeks module 9 we were instructed to create a flowline map that highlights the immigration values for each continent of the worlds total immigration to the United States for 2008. This data was supplied by the US Department of Homeland Security. The type of flowline map that I created falls under the category of distributive flowline maps. This type of map handles data that is quantitative such as immigration values. Using adobe illustrator I was able to customize this flowline map with many appearance and style effects such as, inner glow effects to title and flowlines, 3d extrude and bevel effects to flowlines, and drop shadow effects to flowlines and continents. All of these effects allow for better visualization of map elements. Other essential map elements were added while adhering to cartographic design principles.



Sunday, March 10, 2019

GIS 4006 - Module 8 - Isarithmic Mapping

For this weeks lab, module 8, we were tasked with creating a map that utilizes continuous tone and hypsometric tinting in order to display precipitation data for the state of Washington over a period of 30 years. 
A continuous tone symbology is one that is classless and represents individual points as colors or tones corresponding to values. This symbology is implemented into the Washington Precipitation map as square inches of rainfall with orange tones indicating low values and blue tones values indicating high values.
Hypsometric tinting is a symbology method for enhancing elevation. By assigning colors or tones to contour lines or lines of equal elevation relief can be visualized easier. Colors chosen are typically tones or shades for ground cover found at that given elevation. 
The PRISM group at Oregon State University compiled this point based data set for the entirety of Washington state from 1981 - 2010. The attached map was created utilizing arcgis pro and includes all essential map elements while taking into account cartographic design principles. 


Sunday, March 3, 2019

GIS 4006 - Module 7 - Choropleth Mapping

For this weeks Module 7 we were tasked with creating a choropleth map for wine consumption in Europe. A choropleth map is a themetic map in which areas are shaded or patterned according to a their measurement value. For this map population density for Europe is represented by an orange color gradient scale with lighter colors representing lower pop. dens. values and darker colors representing higher pop. dens. values. I chose a manual interval classification method as I was able to set the class ranges based on attribute table data. Wine consumption is represented by a proportional symbology scale where smaller purple circles represent low wine consumption and larger purple circles represent high wine consumption. Utilizing arcmap and adobe illustrator I was able to apply these two forms of symbology along with all necessary map elements. I found arcmap to be more useful than arcgis pro when it came to labeling the countries as arcmap was able to perform labeling far faster than arcgis pro.



Sunday, February 24, 2019

GIS 4006 - Module 6 - Data Classification

For this weeks Module 6, we were tasked with displaying data for Dade County, Florida in four different classification methods for symbology: Natural breaks, equal interval, quanitle, and standard deviation. Two maps were created that display the percentage of individuals above 65 for the Dade County area and the number of individuals above 65 normalized by the sq. miles field. I chose a color gradient that reflects increasing values through a "hot spot visualization" with lighter colors reflecting lower values and darker red colors reflecting higher values. Each of the four classification methods separates classes based on a unique calculation method but I feel quantile resulted in the best map for visualizing hot spot areas for senior residency. I would also present this information as a percentage as this allows for easier user comprehension and visualization.







Sunday, February 10, 2019

GIS 4006 - Module 4 - Cartographic Design

For this weeks Module 4 we were asked to create a map of Ward 7, Washington DC that highlights the location of public schools. The goal of this weeks module was to create a visually pleasing map theme that allowed for the display of all map elements to be clear and legible. Utilizing Arcgis Pro I was able to just that. My map incorporates all aspects of Gestalt's principles and all essential map elements are present and positioned appropriately. Some features that I chose that made my map more visually appealing include but are not limited to: ordering the drawing order so that no focal elements are obscured, muted color choice that avoids sharp contrast, road features colored with varying degrees of gray % to appear visually distinct from the county background, and use of a white, 2pt halo around neighborhood labels to make them appear visually distinct from background elements. Overall this weeks module was a refresher for me but I did take away valuable knowledge in learning and understanding Gestalt's Principles of Perception. I feel like this knowledge will be valuable, not only in GIS, but in all design oriented projects.



Sunday, February 3, 2019

GIS 4006 - Module 3 - Typography

For this weeks Module 3 lab we were tasked with creating a map using adobe illustrator arcgis pro that highlights 17 features in an area of the Florida Keys known as Marathon. After researching Marathon on the wiki page, (https://en.wikipedia.org/wiki/Marathon,_Florida), I learned that Marathon’s name originates from the Florida East Coast Railroad and that the Florida Keys historian Dan Gallager in his book "Florida's Great Ocean Railway" credits New York playwright Wiiter Bynner for naming Marathon.

The theme for this map is as follows; Font: Berlin Sans FB Demi Bold, Size: 18, Color:Town-Yellow, Airport-Red, Statepark-Green, Countryclub-Blue,  Stroke: White.  All features for this module were labeled using this technique with varying font size/color and leader lines. Leader lines, for this map, were drawn with the pen tool in adobe illustrator and the type on a path tool was used to type Font: Berlin Sans FB Demi Bold, Size: 12, Color: Aerial-Black and Hydrographic-Italicized Blue, into the corresponding features GPS coordinate locations.

Features that make my map unique would be a drop shadow applied to the marathon islands feature layers, a color coded font that aids in the location of Town, Airport, Statepark, and Country Club features accompanied by a color coded legend, and, finally, an aesthetic use of symbols, colors, and border frames to highlight a beautiful area such as Marathon, Florida.





Spring 2023 semester wrap up

 The spring 2023 semester at UWF has been an eventful one in which I finalized the requirements for my bachelors of science in natural scien...