Monday, November 25, 2019

Aerial Photography and Remote Sensing - Module Lab 5 - Unsupervised & Supervised Classification

Hello Everyone!

It's hard to believe, but this week's lab is the final lab of this awesome remote sensing class before I start my final project! With that being said, this week's lab was a great way to end the labs for the semester! This week we covered supervised and unsupervised classification. Unsupervised classification essentially gives the user the power to select how the image is classified using pixel values that match across spectral classes. These classes can then be changed individually so when you change the class, all pixel values in that class change. Supervised classification essentially uses the image analyst to supervise the selection and creation of spectral classes within the program. By defining the areas of classification, it then can classify the image based on a handful of 'seeded' areas.

For this week's deliverable, I was tasked with using supervised classification to classify the landcover/use of Germantown, Maryland. For this exercise, I created 8 seeded areas of interest classification signatures that would serve as the classification seeds for my image. I then chose a band combination (within the map title) that caused the least amount of spectral confusion and then recoded my values. Once my image was complete, I added the new class names and area of each class in acres. Additionally, I added and created a Distance map which shows where areas of classification are likely incorrect. The brighter the area, the higher the chance that the classification of that feature was wrong.




I am really glad that everyone has been following me through this incredible journey in the world of remote sensing and aerial photography, it is truly one of the coolest fields of GIS and I would love to work on this for my capstone research!

~Map On!


Tuesday, November 19, 2019

Aerial Photography and Remote Sensing - Module Lab 4 - Spatial Enhancement, Multispectral Data, and Band Indices

Hello Everyone!

For this week's lab, I worked in ERDAS Imagine to manipulate and enhance various remote sensed images. This week's lab touched on various forms of image manipulation from band layer combinations of Red, Green, Blue which changes the image feature colors, the sharpening, and refining of edges in imagery, and identifying features based on their histogram and band information. Below you can see the example of one of the three features I was to identify. Each of the three features had specific values for pixel values, histograms, and criteria that make them unique. One of my examples can be seen below:

For this map, the feature I was looking for was described as a feature causing a small spike in pixel values within Layers 1-4 around 200 and a large spike between pixel values 9 and 11 in Layer 5 and 6. To determine this feature I first assessed the histogram for each of the 6 layers and then determined the spike areas. I then used the ERDAS Identifier tool to look at the suspected snow area to see if it met both pixel value criteria. When the feature was confirmed as correct, I chose the following band combination to help distinguish the snow cover in the image, Red: Layer 6, Green: Layer 5, and Blue: Layer 3. This causes the snow to appear blue and distinguish itself from the surrounding features. 

~Map On!

Tuesday, November 12, 2019

Aerial Photography and Remote Sensing - Module Lab 3 - Intro to ERDAS Imagine and Digital Data

Hello Everyone!

This week's lab was all about using ERDAS Imagine which is essentially an image processing software that allows users to manipulate and view various types of remotely sensed data and other aerial imagery. Additionally, ERDAS supports vector data. ERDAS grants a user to view multiple sensed images at once, modify their color spectrum and even layer various types of data in one frame. Through ERDAS this week we took a subset snapshot of a remotely sensed image of Washington State. We then pulled this image of types of landcover into ArcGIS pro and created a map set. Through ERDAS I was able to see the category names of each landcover type for each pixel and calculate the area that each type of land cover took up within the subset image. My map can be seen below: 


As you can see, there are 7 (6 present) types of class area land covers within my subset map image. Within the legend, you can see the acreages of those class areas calculated. For this class, we will be using ERDAS more which is a very powerful tool that I am looking forward to using!

~Map On!

Tuesday, November 5, 2019

Aerial Photography and Remote Sensing - Module Lab 2 - Land/Land Cover Classification and Ground Truth

Hello Everyone!

This week's lab was focused on Land Use and Land Cover Classification and Ground Truthing. Land Use can be defined as the way humans use the landscape. This landscape usage can range from residential to commercial to agriculture or industrial. Land Use is not the easiest to decipher from a satellite image. Land Cover, on the other hand, is the biophysical description of the surface of the earth. Land cover can range from water to forests or wetlands. These types of features are much easier to identify from a satellite image. For this lab, I was tasked with creating a Land Use and Land Cover map from a satellite image of a portion of Pascagoula, Mississippi. For every unique feature on the image at a working small scale, I digitized and created polygon boundaries for each of the various types of land cover and land uses. The map I created can be seen below:


For my map, I ended up with 12 unique land use and land cover classes. For the second part of my lab, I had to ground truth 30 test point locations and create an accuracy statement. Overall I had a visual interpretation accuracy value of 80% which means 80% of my deduced land cover and land use guesses were correct and my map has 80% accuracy. See you next week!

~Map On!

Wednesday, October 30, 2019

Aerial Photography and Remote Sensing - Module Lab 1 - Visual Interpretation

Hello Everyone!

This semester I am starting Aerial Photography and Remote Sensing. For this week's lab, I learned all about identifying various features and aspects of aerial images. I essentially had three primary exercises, I will show you the final maps for the first two and talk briefly about the third.

For the first exercise, I was able to distinguish two aspects of aerial photographs. Tone and Texture. The tone in an aerial image is how bright or how dark a section of an aerial image is while the texture is how smooth or how coarse a surface of the image area is. For this map, I selected 5 areas of tone (in red) that range from very light, light, medium, dark, and very dark. For texture, additionally, I selected 5 areas of texture (in blue) that ranged from very fine, fine, mottled coarse and very coarse. The results of my first map can be seen below:


For the second exercise, I distinguished aerial photography features based on four specific criteria: These criteria are a shadow, pattern, shape and size, and association. For shadow, I used the shadow of the object to identify features (such as a power pole). For shape and size, I used just that such as the shape and size of a vehicle. Pattern, I used identified clusters such as a cluster of buildings or trees, and for association I used a grouping and contextual location such as buildings with a big parking lot being a potential mall. 


Finally, for the third and final exercise, I picked points on a true-color image and compared them to the same locations on a false-color infrared image. This was a really cool exercise as true color locations showed up opposite as false-color (an example being a forest that is green in the true-color image and red in the false-color infrared image.

~Map On!

Tuesday, October 15, 2019

Special Topics in GIS - Module 3.1: Scale Effect and Spatial Data Aggregation

Hello Everyone!

It really is hard to believe, but here we are at the end of Special Topics in GIS, it has bee a great course and I have learned so much in the past 8 weeks. From data accuracy to spatial data assessment, we have covered so much this semester. For this final lab, we covered a huge topic that is very relevant in GIS today and that is the effect of scale on various types of data in addition to the Modifiable Areal Unit Problem and how it pertains to congressional district gerrymandering. I'd like to break down the effect of scale and resolution on the two types of spatial data: Vector and Raster.

When vector data is created at different scales there will obviously be a difference in detail of the data. For the lab, we were given multiple hydrographic features taken at three scales:

1:1200
1:24000
1:100000

At the 1:1200 scale, hydrographic lines and polygons can be expected to reflect the nature of the real world in the data. Polylines at this level will be very detailed and have a high number of vertexes. Polygons will be more inclusive in features.

At the 1:24000 scale, feature detail begins to drop. Polylines have less detail and shorter total lengths to account for the less number of features illustrated. Polygons drop off at this level of scale, and polygons compared to the 1:1200 scale are not accurate reflections of the features.

At the 1:100000 scale, data detail becomes even less than at the 1:24000 scale. Polylines are as minimal as possible with very little detail and polygons are missing even more since features are too small to draw by eye. The data very minimally reflects the real world.

For raster surface data, the difference in resolution can heavily impact the data. For this lab, I resampled a raster surface (1-meter cell size) DEM of a watershed surface feature at five different resolutions:

2-meter cell size
5-meter cell size
10-meter cell size
30-meter cell size
90-meter cell size

Using a bilinear sampling method designed specifically for this type of continuous data, with each resample to the next resolution size up, the quality of the raster surface decreased. Larger cell values did not reflect the values accurately of the initial 1-meter cell size values when calculating the average slope of each raster.

These two typed of spatial data with there issues point to a problem well known in the GIS world known as the Modifiable Areal Unit Problem. This 'problem' essentially arises when you create new boundaries to aggregate smaller features together into new areas. These 'new boundaries' are usually always arbitrary and in no way reflect the data of the smaller pieces within them and can be deceiving. A great modern GIS issue of this is Gerrymandering. Gerrymandering is a political strategy to redraw boundaries of districts so that they favor one particular political party or class. In the state of Florida, gerrymandering has been under the spotlight for some years. While gerrymandering is tough to measure by the human eye (with some exceptions), it can statistically be measured. Through a method called the Polsby-Popper Score, congressional district compactness can be measured. This value is calculated by multiplying the area of the district by 4pi and then dividing that number by the perimeter squared of the district. The values returned can range from a value of 0 to 1. Values closer to 1 reflect districts that are more compact while values closer to 0 reflect districts that are very 'loose'. The looser the district, the higher the likelihood it has been gerrymandered.

Below is the district (in red) that received the lowest Polsby-Popper Score value of 0.029


I hope you have enjoyed keeping up with my learning this semester. Next semester I will be taking on Advanced Topics in GIS and Remote Sensing. I look forward to sharing these next moments with you and as always...

~Map On!



Wednesday, October 9, 2019

Special Topics in GIS - Module 2.3: Surfaces - Accuracy In DEMs

Hello Everyone!

This week's lab focused all on assessing the vertical accuracy of DEMs. For the lab this week I analyzed the vertical accuracy of a DEM of river tributaries within North Carolina. To assess the DEM's vertical accuracy, I was given reference point data taken by high accuracy surveying equipment. The 287 reference points were taken at five various landcover type locations. These land cover types are as follows:


  • A - Bare Earth/Low Grass
  • B - High Grass/Weeds/Crops
  • C - Brushland/Low Trees
  • D - Fully Forested
  • E - Urban
To assess the vertical accuracy of the DEM I extracted the elevation values from each cell that where each reference survey point fell. Now that I had the actual elevation points and a set of reference points for each actual value, I could compare the results. To assess accuracy, I calculated 4 statistical numbers for each land cover type and the dataset as a whole. My four statistical numbers included accuracy at the 68th percent confidence interval, the accuracy at the 95th percent confidence interval, the RMSE (Root Mean Square Error), and the Bias (Mean Error). The Root Mean Square Error is the most used metric to assess and calculate accuracy. Higher RMSE values mean lower accuracy and lower RMSE values mean higher accuracy. My results can be seen below.


For my analysis, the Bare Earth has the highest accuracy with the fully forested land cover having the lowest. This is no surprise as creating a digital elevation model of the varying land cover of the earth's surface can be quite challenging since various land cover types can vary in terms of accuracy. 

~Map On!

Thursday, October 3, 2019

Special Topics in GIS - Module 2.2: Surface Interpolation

Hello Everyone!

This week's lab was all about interpolation methods for surface data. Interpolation of spatial data is essentially assigning values across surface data at unmeasured/unvalued locations based on the values at measured/values sampling locations. During this lab, I worked with three primary forms of surface data interpolation. Thiessen Polygons, IDW or Inverse Distance Weight and Spline Interpolation. For the Spline interpolation method, there are two types of Spline Interpolation: Regular and Tension.

For this week's lab I worked in two parts. For part A, I compared Spline and IDW interpolation to create a Digital Elevation Model. While this part of the lab and assessing the differences between the two data methods was interesting, I'm going to share with you Part B. For Part B, I was provided 41 sample station water quality measurement points sampled in Tampa Bay, Florida. These data points essentially focus on the water quality and specifically the Biochemical Oxygen Demand (mg/L) at each sample.

Thiessen Polygons

The Thiessen Polygon interpolation method is fairly straight forward. Thiessen polygons contruct polygon boundaries where the value throughout the polygon is equal to the value of the sample point. Overall this method is fairly simple and widely used but for the nature of water quality data, the drastic shifts in polygon values and their clunky look do not reflect the data.

IDW (Inverse Distance Weight)

This method is much better for the nature of the data I was interpolating. Essentially, the values associated with the points directly affect the interpolation while the value decreases the further it gets away from the points. Points that are clustered together tend to push the overall data distribution higher in the clustered areas of concentration. For this data, this method still felt too clunky and did not reflect water quality.

Spline (Regular and Tension)

Spline Interpolation, the smoothest method employed in this lab essentially tries to smoothly go through the data sample points while reducing the curvature of the surface data. Regular spline interpolation is much more dynamic with value ranges (I had negative values even though my data contained none) with lower lows and higher highs. Tension spline interpolation attempts to reduce the factor of data values outside the initial range. For the nature of the data, I believe that Tension spline interpolation (Below) is the best method to visualize the surface data. Water is a smooth continuous medium and water quality can change constantly. Interpolation of this quality of data needs to be loose, but not exceed the data itself making tension spline interpolation the best method for this week.


~Map On!

Thursday, September 26, 2019

Special Topics in GIS - Module 2.1: Surfaces - TINs and DEMs

Hello Everyone!

This weeks lab is one of my favorite labs so far that I've done in my special topics GIS class. For this weeks lab, it was all about working with surface data. When working with surface data in GIS, there are two main types of surface data TINs (Triangular Irregular Networks) and DEMs (Digital Elevation Models). TINs are a vector-based surface data type that uses vertices distributed across the surface to draw triangular edge lines that connect these vertices together. None of these triangle surfaces overlap and you can find that they can better visualize surfaces that vary greatly compared to surfaces that have little to no variance. DEMs share some similarities with TINs, like TINs, DEMs are a great way to visualize a continuous surface. Unlike TINs, DEMs are a raster-based surface data type that uses elevation points within a series of grid cells. These cells can range anywhere from one meter to fifty meters in size. Each cell in the DEM has a unique value. Compared to TINs a digital elevation model is much smoother in showing the surface data while the DEM is much more geometric. While TINs and DEMs are different in the way they visualize surface data, there are a variety of useful functions that they can both do. You can symbolize these two types of surface data in various ways from elevation to slope and aspect values. With this surface data, you can also create contour lines. Below you can see the differences between a TIN and a DEM.

Slope Symbology (DEM)

Aspect Symbology (DEM)

Slope with Contours (TIN)

I could write pages about TINs and DEMs and all the practical and unique uses they have. Before I wrap up this weeks blog, I would like to share with you a DEM project that I worked on this past year that showcases the beauty of working with the aforementioned surface data types. 



For this project, I used a LiDAR (Light Detection and Ranging) image (Top) of the surface of Crater Lake in Oregon taken via remote sensing. Crater Lake almost fills a ~2,200 ft deep caldera that formed roughly 7,700 years ago when the volcano Mount Mazama collapsed. It is the deepest lake in the United States with a depth of 1,949 feet and ranks as the ninth deepest rank in the world. From the LiDAR image, I created a hillshade which is essentially a grayscale representation of the earth's surface in 3D that takes into account the position of the sun to shade the terrain. Once my hillshade was created, I overlayed the original LiDAR image and symbolized it by elevation (cool colors low, warm to gray colors high). I then added bathymetry data to show the depth of the lake. I hope you have enjoyed this weeks lab material, working with surface data is one of the coolest GIS applications! 

~Map On!

Wednesday, September 18, 2019

Special Topics in GIS - Module 1.3: Data Quality - Assessment

Hello Everyone!

For this weeks lab, we focused on the assessment of data. The lab that I will be sharing with you this week was all about comparing the completeness of two different road shapefiles in the state of Oregon. For this lab, the first level of assessment was comparing the overall completeness of each road dataset by comparing the sum values. Out of the two road datasets I was given (TIGER Lines and Jackson County, OR Centerlines) the TIGER lines are more complete from by over 500 kilometers. Once the overall completeness assessment had been completed, I was then tasked with assessing completeness within a grid. This task would essentially take a grid of 297 cells and compare the total length of roads within each cell. To find these values, I used a tool in ArcGIS Pro called 'Summarize Within'. This tool essentially allows you to find out various levels of information regarding features within other features. In this case, I was looking at the sum of roads for both datasets within each grid. Before I could run my analysis, I needed to clean up the data a little. The TIGER Lines were in a different projection system that the rest of my data, so I reprojected them to match the other data. I also needed to clip my road features to the extent of my grid so that no roads would be outside my study area. I then ran my summarize within to get the sum of road segments in each cell. Finally, I needed to find the percentage of completion for each cell. To achieve this, I used a standard percent difference calculation that gave me both a positive and a negative percentage. Below is the map of my data without the roads to avoid excess map clutter:


As you can see on my map, there are both grid values of positive and negative percentage values. Areas with positive percentages increasing along the blue color ramp portion indicate cells where the sum of the County Center Line roads is greater than the sum of the TIGER Lines (higher percentage completion of County than TIGER). Cells that move up the red portion into the negative percentages indicate cells that have a greater sum of TIGER Line roads compared to the sum of the County Center Line roads (higher percentage completion of TIGER than County). Within this data, it should also be noted that there are two specific grids that are special. There is one cell that contains no roads for either of the datasets and is marked as gray with a 'No Data' attribute. Second, there is one cell (darkest red) where TIGER lines are 100% completion because there is no County road data within that cell.

Saturday, September 7, 2019

Special Topics in GIS - Module 1.2: Data Quality - Standards

Hello Everyone!

This weeks lab is an extension of Spatial Data Quality. For this weeks lab, I did my data quality assessment according to the National Standard for Spatial Data Accuracy (NSSDA). According to the NSSDA, some criteria need to be met when selecting test points. For this lab, I was given two road datasets. One data set is Albuquerque streets from the city of Albuquerque. The second road dataset is Albuquerque streets from StreetMap USA which is distributed from ESRI. Finally, I was provided several satellite aerial images of the study area portion of Albuquerque divided into quadrangles. When comparing the road datasets to the satellite aerial images, it was evident that on the surface, the two datasets had very differing positional accuracy from each other. For my positional accuracy analysis, I chose 20 randomly selected intersection points within one of the provided aerial image quadrangles of Albuquerque. Proper intersections that I chose for analysis were cross(+) intersections and right angle '90-degree' 'T' intersections. Per the NSDAA standards, my test points had a distribution of at least 20 percent of points in each quadrant of my aerial quadrangle and at least 10 percent spacing (at least 370 feet apart) distance of the diagonal length of the quadrangle. To select these points, I created intersection points for both road datasets using a geoprocessing tool within ArcGIS Pro. I then selected the random test points at the appropriate type of intersection ensuring to select the correct intersection for both road datasets and following the aforementioned NSDAA distribution/spacing rules. My test points can be seen below for one of the road datasets:


Once my test points had been selected, I then digitized reference points to compare the positional accuracy bases on the aerial satellite imagery location of each intersection. Once the test points and reference points were created, test points were assigned matching Point IDs with the reference points so their coordinate values could easily be analyzed. After assigning XY coordinate values to both sets of test points and my reference points, I exported them as DBF files and then plugged them into a positional accuracy spreadsheet provided by the NSSDA that calculates the positional accuracy using the 95th percentile. Essentially the table compares the XY position of each test point to its matching reference point (the importance of matching Point IDs for both test points and reference point). This sheet calculated the following values. Sum, Mean, Root Mean Square Error (RMSE), and the National Standard for Spatial Data Accuracy statistic which multiplies the RMSE by a value of 1.7308 (95th Percentile for Horizontal Accuracy) to yield the horizontal positional accuracy at the 95th percentile. My formal accuracy statements can be found below that meet the NSSDA guidelines:

ABQ Streets Test Points:
Horizontal Positional Accuracy: Tested 14.106 feet horizontal accuracy at 95% confidence level.
Vertical Positional Accuracy: Not applicable

Street Map USA Test Points:
Horizontal Positional Accuracy: Tested 258.682 feet horizontal accuracy at 95% confidence level.
Vertical Positional Accuracy: Not applicable

I genuinely enjoyed working through this weeks lab and look forward to sharing more special topics with you and as always... ~Map On!

Tuesday, September 3, 2019

Special Topics in GIS - Module 1.1: Calculating Metrics for Spatial Data Quality

Hello Everyone! 

It's hard to believe that we are already going full speed in the fall semester of 2019. Soon 2020 will be upon us and I will have completed my first year of graduate school here at UWF. Last semester, I focused primarily on GIS Programming and Spatial Data Management using SQL. This semester, I'll be focusing on both special and advanced topics in GIS as well as Remote Sensing and Aerial Imagery. Let's jump right in for this phenomenal first week!

For this weeks lab in Special Topics of GIS, I was tasked with calculating metrics for spatial data quality. In this lab, I analyzed spatial data quality for a set of gathered waypoints taken by a handheld GPS unit in two separate ways. The first was via a map with buffer zones (below) showing three percentiles of precision. The second which will not be discussed in this post is a root-mean-square error analysis and a cumulative distribution function graph.

Before I delve into my findings, accuracy and precision need to be explained in the realm of GIS. For the purpose of this post, I am assessing horizontal accuracy and precision. To derive the horizontal precision, which is the closeness of the recorded points to one another, I calculated an average projected waypoint I then created three buffers for precision percentiles that contain an x amount of points. The buffers I created were at 50%, 68%, and 95%. For horizontal accuracy, which is how close the measured values are to the actual (reference) point, I measured the distance of my average projected waypoint from my horizontal precision calculation to the actual reference point.

Now that my methods of determining horizontal precision and accuracy have been explained, I would like to share my results with you.


For horizontal precision, I got a value of 4.5 meters when measuring precision at the 68th percentile. If we are basing the precision off of the 68th percentile then these results would be precise. For my horizontal accuracy, the distance from the average waypoint (blue) to the reference (actual) point was 3.24 meters. Compared to the precision value, these results have fairly high accuracy. Overall, after assessing the horizontal accuracy and precision, it can be observed that the GPS waypoints collected in this test are more accurate than precise. Determining accuracy and precision is, of course, subjective. If these measurements were taken by a surveying company, the resulting precision and accuracy values would be considered failure by survey standards. However, if these waypoints were referencing an object such as the location of a fire hydrant or electrical unit box, they would be much more suitable. Finally, in terms of bias, many factors impact the results. How good is the GPS unit? Are there any satellite connection interference variables such as buildings or weather? Is the user holding the unit consistently in one position? These can all play a role in how data is collected. 

I look forward to sharing my future work with you all and as always...

~Map On!

Friday, July 5, 2019

GIS Programming - Module 7 Lab

Python 3.6.6 |Anaconda, Inc.| (default, Jun 28 2018, 11:27:44) [MSC v.1900 64 bit (AMD64)] on win32

>>> print ("Hello Everyone!") 

Hello Everyone!

I cannot believe it but this was the final lab of my GIS Programming Class! For this weeks lab material, I worked completely with raster image data which is hands down my favorite type of data in GIS (sorry vector...). This week I was tasked with creating a raster dataset from two existing rasters. The final output raster needed to meet the following conditions an include the following features:

1. Reclassified values of forest landcover (41,42, and 43). This only shows forested land.
2. Highlight elevation areas with a slope value greater than 5 degrees and less than 20 degrees.
3. Highlight elevation areas with an aspect-value greater than 150 degrees and less than 270 degrees.

Once the parameters of my script had been defined, I needed to create an overall structure of how my script would be written. This was how I designed my script.

Start
>>>import necessary modules
>>>import arcpy.sa (spatial analyst module)
>>>set outputs and overwrite parameter to true (print success message)
>>>conditional if statement that won't run if spatial analyst extension is not enabled
     >>>reclassify values of 41,42, and 43, to a value of '1'
     >>>set good slope value condition
     >>>set good aspect value condition
     >>>combine 3 rasters
     >>>save final combined raster (print success message)
>>>Else portion of statement that prints message saying saptial analyst isnt enabled.
Stop


As you can see from the results above, my script ran correctly with the print messages spread throughout to give the user updated progress as the script runs. If the spatial analyst extension was not enabled, the else statement message would have printed instead of the script running through completion. The results of my final raster also turned out successful. The areas in red are those that are all suitable according to the parameters I was given. All are forested areas that have a slope between 5 and 20 degrees and an aspect between 150 and 270 degrees. I hope you have all enjoyed this journey with me through this course, I have learned so much! Thank you for taking the time to keep updated on my pursuits and until next time...

~Map On!
 


Wednesday, June 26, 2019

GIS Programming - Module 6 Lab

Python 3.6.6 |Anaconda, Inc.| (default, Jun 28 2018, 11:27:44) [MSC v.1900 64 bit (AMD64)] on win32

>>> print ("Hello Everyone!") 

Hello Everyone!


It's so hard to believe that I just completed my second to last GIS Programming module lab! Time sure has flown by in this course. This weeks lab in addition to some other life events really had me stumped in the beginning but after the dust settled and about 6 cups of coffee later the results proved successful! For this weeks lab and lecture, I learned all about geometries. When looking at the geometries of features in GIS there is a hierarchy of understanding that can really help you. The first and highest level is a feature. This essentially is each row in the attribute table. In this weeks lab, I worked with a rivers shapefile from a Hawaii dataset so for this example, each feature would be a stream/river in its entirety. The next level of the hierarchy is an array. An array is essentially the collection of points/vertices that make up a feature. An example would be that a specific feature has an array of 15 vertices. Finally, the last level of the hierarchy is the individual point/vertex. These are usually expressed in the (X, Y) vertex format. Essentially the structure is as follows:

    Feature > Array > Vertex

For this weeks lab, I was tasked with working with the aforementioned geometries. I was given a shapefile containing river features from Hawaii and was tasked with writing the geometries of each feature to a newly created TXT file. For my text file, I needed individual lines that provided me with the following information: Feature ID, Vertex ID, X Point, Y Point, and Feature Name. In total there were 25 features in my data and 247 total vertices that I had to list with their respective X and Y points and feature names. Before I get to the results, I would like to share the basis of my code so you can understand how I got my results.

~To Do:
1.     Set my environment parameters
2.     Create a new TXT file that’s writable
3.     Create a search cursor that calls on OID (Object ID), SHAPE, and NAME
4.     3 For loops:
      a.      First: Iterates Rows
      b.      Second: Iterates Array
      c.      Third: Iterates Vertices
5.     Print and Write my results in the script and new TXT file
      a.      Feature #, Vertex #, X Point, Y Point, Feature Name
6.     Delete row and cursor variables
7.     Close file access

Start
>>>import statements
>>>environment statements (workspace and overwrite)

>>>define feature class
>>>open new writable file
>>>define the cursor
>>>for loop to retrieve rows
>>>for loop to retrieve arrays
>>>for loop to retrieve vertices
>>>print and write to the newly created TXT file
>>>delete row and cursor variables
>>>close file
End

My results turned out better than expected (below):


As you can see, new lines were written to my TXT file starting with Feature 0 then iterating through each Vertex in the array providing you with the X point, Y point and the name. Once Feature 0's (Honokahua Stream) vertex array had been iterated through, Feature 1 (Honokowai Stream) was iterated through next until all 247 vertices were complete for the 25 features total. Overall implementing the nested for loops in my script was the toughest part and caused the most hangup for me. The final module will be one of my favorites in this class as it pertains to Raster data!



Wednesday, June 19, 2019

GIS Programming - Module 5 Lab

Python 3.6.6 |Anaconda, Inc.| (default, Jun 28 2018, 11:27:44) [MSC v.1900 64 bit (AMD64)] on win32

>>> print ("Hello Everyone!") 

Hello Everyone!

For this weeks lab in GIS Programming, we have been working with data exploration and manipulation using Python in both ArcGIS Pro and Spyder. For this weeks lab, I was assigned to create a multi-part script that carried out several data tasks. First, I was to create a new file geodatabase. Then, I had to copy the original data into the new file geodatabase. Once the data had been copied into the new file geodatabase, I was tasked with creating a search cursor using a SQL query 'where' where clause that returned and printed 3 pieces of information, the name, feature type, and population from the year 2000 of cities that all had a feature type of 'County Seat'. Finally, I took the information from my search cursor and constructed a python dictionary that when printed shows the cities that met the SQL query search criteria in the format of 'City' : Population format. To break things down further I have created a pseudocode block to conceptualize my process.

Start
>>> Create new file geodatabase (fGDB) named mod5.gdb for data storage. Print result messages.
>>> Create a feature class list and copy features from data to new fGDB (use basename property to remove the .shp extension for compatibility). Print result messages.
>>> Create a search cursor with a SQL 'where' clause and for loop to select cities that have a feature type of 'county seat'. Print results in the form of clustered messages (City name, Feature Type, and Population from 2000).
>>> Create a new dictionary with a for loop that when printed returns a compiled dictionary list of all the cities and their populations that meet the search cursor criteria (ex. 'Townsville : 5000'). Print result messages and newly created dictionary.
Stop

To see my code in action, I have clustered the results together and will explain each section below. I decided that separating each running portion with a new line of '*' would make the results easier to read.


The picture above shows the results of my script being run. The first section of the code successfully creates a new file geodatabase (fGDB) and lets the user know that the process was started and completed successfully with the start and finish time. The second portion of the code copies the eight shapefiles over to the newly created fGDB. For this portion of the code, it was essential that I used the basename property when copying the features over as shapefiles are not compatible with file geodatabases. By using the basename property, 'airports.shp' now becomes 'airports' and is able to be copied to the new fGDB as a feature class. As you can see, the script prints start and finish messages after each feature is copied and lets the user know the task has been successfully completed. The third portion of the code is where I implement my search cursor. As you can see, a message displays showing that the search cursor process has started. By incorporating a 'where' clause SQL statement, the search cursor returned only the name, feature type, and population for the year 2000 of the cities with a feature type of 'County Seat' as shown in the results. Once again, a message prints informing the user the task has been completed successfully. Finally, the script informs the user that a new dictionary named county seats is being created and upon successful completion prints the runtime message and the completed dictionary in the {'City' : Population}format with city names being the dictionary keys and population number being the dictionary values. At the end of the script, a message prints informing the user that the script has finished running in its entirety. 

Overall I really enjoyed this weeks lab and am so happy with the progress I have been making. One hangup this lab gave me was with the creation of my dictionary. I found that whenever I tried to use the required loop to populate my empty dictionary, it would only ever print the empty dictionary. To solve this issue, I called my search cursor a second time and the dictionary appended itself perfectly. Thank you for tuning in this week and I look forward to sharing my future work with you!

Wednesday, June 12, 2019

GIS Programming - Module 4 Lab

Python 3.6.6 |Anaconda, Inc.| (default, Jun 28 2018, 11:27:44) [MSC v.1900 64 bit (AMD64)] on win32

>>> print ("Hello Everyone!") 

Hello Everyone!

This weeks lab focuses on using geoprocessing tools through two streamlined methods: Model Builder in ArcGIS Pro, and Python Scripting through Spyder. For this lab, I was tasked with creating two projects. The first project was to determine suitable farmland in a study area using Model Builder. To accomplish this task, I first clipped the soil data to my basin (study area). I then selected all soil features that were not suitable for farming based on an attribute value. Finally, I used the erase tool to erase the features in my soil data that were not suitable for farming. It is essential to know that Model Builder provides a means for users to string together multiple tools and allows them to bypass running each tool individually. My results (below) show that the soil features not suitable for farming were removed.


Initial Clipping

Final Results With Unusable Soils Removed

The second part of the lab required me to run various geoprocessing tools in the Python environment. For this project, I was tasked with three primary objectives. I first had to add XY Coordinate data to a shapefile containing hospital data. I then had to add a 1000 meter buffer around the hospital features. Finally, I had to dissolve the buffers in the new hospital shapefile to create one feature. This portion of my project was all completed in Spyder. The results below show that each tool function of my script ran successfully and with the addition of the GetMessage() function, I was able to print the run-time messages after each portion was run.


Wednesday, June 5, 2019

GIS Programming - Module 3 Lab

Python 3.6.6 |Anaconda, Inc.| (default, Jun 28 2018, 11:27:44) [MSC v.1900 64 bit (AMD64)] on win32

>>> print ("Hello Everyone!") 

Hello Everyone!

This weeks lab was all about Debugging! Debugging is probably one of the most important aspects of Python as it allows you to catch all the errors in your code that are causing it to fail. For this weeks lab, I was given three template scripts that contained errors. Two of these scripts required me to fix the errors within them, and the third required me to write a try-except statement that bypassed the error in the first part of the script and then run the second part. In Spyder, the Debugging tool is invaluable. With the ability to go line by line and find errors within your code is essential to ensure you're catching and proofing every line of code. For the first two scripting examples, this is the flow methodology I used:

Start
>>>Look over the code to find individual errors

->>>Run the code and find any errors missed individually
or
->>>Run the debugging tool line by line and fix errors.

>>>Run the successfully fixed code and get desired results
Stop

Once the debugging process had been completed, the scripts ran successfully with these results:



The first two examples contained multiple case-sensitive errors and attribute name errors that cause the interpreter to get hung up on as Python is very case sensitive.

For the third script, I had to write a try-except statement that would run a part of code even with an apparent error/exception. For this portion my methodology was as follows:

Start
>>>Look over the code to find errors within Part A
>>>Run the code using the debugging tool to ensure the error is where it is
>>>Write a try-except statement that will print the error exception message without hang up
>>>Ensure Part B of script runs
>>> Run both parts getting the exception message and Part B success.
Stop

As you can see in the results below, the script ran as intended, printing the Exception/Error message of Part A without hanging up the script and successfully running Part B.


Wednesday, May 29, 2019

GIS Programming - Module 2 Lab

Python 3.6.6 |Anaconda, Inc.| (default, Jun 28 2018, 11:27:44) [MSC v.1900 64 bit (AMD64)] on win32

>>> print ("Hello Everyone!") 

Hello Everyone!


This week’s lab was all about learning the basics of Python! For this week’s lab, I had three separate coding exercises. For the first exercise, I was tasked with printing my last name from a created list. For the second exercise, I had to edit the given script for a dice game with a handful of errors that would prevent the script from running and import a specific Python module. Finally, for the last exercise, I was tasked with creating a script that creates a list of twenty random integers between 0 and 10 and then select and remove every occurrence of a specific integer and print the newly updated list. As you can see below these were the basic flowcharts I created to help me construct my scripts for parts one and three as they were the scripts I needed to write myself and not edit.



After writing and editing my scripts, these were the results.



As you can see the script successfully printed my last name, the prewritten script that I edited and corrected errors ran for the dice game, and it created the list of twenty random integers, selected the unwanted integer, and removed all instances of the integer and printed an updated list. I really enjoyed this week’s lab as it brings back really good memories of when I first started Python, and I look forward to sharing my future progress with you!

~ Code On!

Monday, May 20, 2019

GIS Programming - Module 1 Lab


Python 3.6.6 |Anaconda, Inc.| (default, Jun 28 2018, 11:27:44) [MSC v.1900 64 bit (AMD64)] on win32

>>> print ("Hello Everyone!") 

Hello Everyone!

Well, I can officially say that I have completed my first ever semester of Graduate school and I am loving it! To kick things off for this Summer semester, I am taking a GIS Programming class that will focus heavily on using Python (I just could not resist having a specialized intro for this blog series!) to create various GIS processes. For this weeks lab, I focused on primarily learning about the history of Python and some coding basics that include how to map out our code using flowcharts and pseudo code. I was also tasked with creating the required folder directories on my machine to work through the class from a provided script. To run this script, I had to use Spyder which is the Python interface/editor I will use primarily for this class. This was achieved by simply typing in the word 'spyder' into the Python command prompt. I then opened the script and examined each line to get an idea of what the script would do. Finally, I ran the script and it created my folder directories (seen below).
As you can see, the script I was provided created a series of directories for each module of the class. Since the class is 8 weeks in length, there are 8 modules in total. Within each module folder, there are three subfolders (Data, Results, and Scripts). I am so excited to be taking this class as I can continue to work with my preexisting Python skills and develop them further. I look forward to sharing my progress with you all!

Thursday, May 2, 2019

GIS 5007 - Final Project

Hello Everyone!

It's so hard to believe that my Cartography class is coming to an end, I have learned SO much this semester here at UWF. I never thought I would leave saying Adobe Illustrator is a Life Saver. For my final project, I was tasked to create a map of US national average cumulative SAT scores and participation percentages (seen below):



For this project, a bivariate map using choropleth and graduated symbols was created.  A choropleth map was used to depict the average SAT scores because it excels at emphasizing class-based data where phenomena are grouped together for a means of comparison (Slocum, Thematic Cartography and Geovisualization, 2009).  The comparison of state cumulative average scores would best be seen by the intended audience using a color ramp from red (lower scores) to green (higher scores).  The SAT score data was classified into seven classes to best represent the variance in scores across the nation and show more distinction than five classes.  For this method, equal interval classification was used, because it makes the thematic data easier for the intended audience to understand (Slocum, Thematic Cartography and Geovisualization, 2009).  Since this data pertains to average scores per state, the data was not standardized.
The second thematic method used was graduated symbols to summarize the state participation percentage.  Graduated symbols were used because they best show the change in quantity and the magnitude of participants taking the SAT.  This data was broken down into four manual classes ranging from two to one hundred percent.  This was done because it was the easiest method that would be understandable by the public.  Again, this data was not standardized since the flat percentages were given for each state.  While other more advanced methods of data classification such as natural breaks, quantile, or standard deviation methods could have been chosen, due to the research specifications and public audience, data simplicity was the primary goal.
            To best capture the data in question, the map was created in a portrait view to fit the entire continental United States.  The importance of this orientation was also that the state of Alaska and Hawaii could be fully represented.  It was also decided that the map should be grouped and labeled together by relatively loose regions, the southeastern/northeastern states, the Midwest states, the mountain states, and the Pacific states (Alaska and Hawaii included but not to scale).  An inset map was also included to show the Washington D.C. area that would be obstructed from a normal perspective.  To emphasize the regions, a drop shadow effect was used to draw the viewer's eye to the various regions and make the map have a pop out effect.  In addition to utilizing drop shadow, visual hierarchy rules were implemented.  First, the choropleth and graduated symbols were given the only color aside from the legend elements as these two components were the most important.  Second, the title was clearly visible and concise, but all other text was reduced in size to not distract the viewer from the map.  Finally, any elements that were not of visual importance such as cartographer information, data sources, and north arrows were minimize either in size or opacity.
The results of this project were very interesting, the results show an inverse correlation between the two variables with less participation yielding higher test scores with the highest average scores in North Dakota with the lowest participation (2%) and the lowest scores in D.C. with the highest participation (100%). It just goes to show that using the SAT alone does not give you an accurate portrayal of statewide data with potential unrepresented groups.

Sunday, April 7, 2019

GIS 50007L - Module 11: 3D Mapping

Hello Everyone! 

It's hard to believe that this is the second to last module in my Cartography class! This weeks lab was all about 3D mapping. For this lab, I was lucky to take a 3D mapping class from ESRI to practice my 3D mapping skills. For this educational class, I had 3 main exercises. First, I created a map of crater link with a linked view of a 2D map and a 3D scene. When I zoom or navigate in one of the panes, it zooms and navigates in the other. Second, I created a 3D scene of downtown San Diego to find a suitable hotel with an ocean view and shade for a convention being held there. Finally, I made a 3D scene of San Diego with realistic 3D building textures and realistic trees. I also included two additional layouts, one of the convention center and one of a hotel nearby (seen below).

Finally, I created a building footprint of Boston that I then exported to use in Google Earth that other people can use. 3D mapping has a variety of uses. For example, you wanted to get a good 3D scene representation of a city, you could. One of the advantages of using 3D mapping is that you can visualize features much better in 3D than you can in 2D. With this informational form of mapping comes a challenge. 3D mapping is quite a processive intensive process and sometimes it can be difficult to visualize the data you want without difficulty. While 3D maps can show information in a completely new way, they can be hard to print in a 2D layout. 

I look forward to finishing my last module next week on Google Earth and as always ~Map On!

Sunday, March 31, 2019

GIS 50007L - Module 10: Dot Density Mapping

Hello Everyone! 

For this weeks lab, I created a dot density map. Dot density maps use dots to visualize a certain number of geographic phenomenon. For this map, I created a dot density map of the population of South Florida from the year 2010. To create this map, I fully used ArcGIS Pro. I took the data from south Florida and then joined the census data in order to get the population from each county. After the join, I symbolized the data of population using dot density where the value of each dot was the right size and count. For my map, each dot represents 2,000 people. Next, using the water features feature mask, I was better able to represent the distribution of the population. To add to my map, I labeled four major cities but also classified the four types of surface water features. 


While dot density mapping is an effective thematic mapping style, one needs to take into account the dot size and density as it is easy to misrepresent the data. Stay tuned as we add another dimension to our maps in 3D Mapping and as always ~Map On!

Sunday, March 24, 2019

GIS 50007L - Module 9: Flow Mapping

Hello Everyone!

This weeks lab and material is all about flow mapping! Flow maps are maps that illustrate movement from region to region on the geographic scale. These maps use lines of various proportional widths in order to convey both quantitative or qualitative data. There are five primary types of flow line maps. Distributive flow maps which show the movement of people or goods between geographic regions. Network flow maps which depict network patterns such as transportation systems. Radial flow maps like the one I created for this weeks lab that shows migration to a specific region from other geographic regions. Finally, continuous flow maps which show specific continuous data such as winds or ocean currents and telecommunication flow maps which depict networks such as telecommunication and the internet.

For this lab, I was tasked with creating a flow map that shows migration from the various geographic continental regions to the United States (see below):


This map shows all the regions where people have migrated from to come to the United States. I created flow lines that are proportional to the number of migrants from each region so the largest flow line is from the region of North America and the smallest is from the Oceania region. Included in this map is also an inset choropleth map of the United States showing the percentage of total immigrants per state so the user can get a sense of where most immigrants go when they migrate to the U.S. For this map, I was required to add a stylistic effect so I color coded my flow lines in order to better represent them in my legend. While this effect does make the map look a bit busy, I believe that it can benefit the viewer to help distinguish the change in immigrants from each geographic region. This assignment was fully created in Adobe Illustrator and one thing I particularly struggled with and need to practice is making smoother more continuous lines. Next week I look forward to jumping to the other side of the mapping spectrum to dot mapping and as always ~Map On

Sunday, March 17, 2019

Applications of GIS: Crime Analysis

Hello Everyone! 

This week I've been enjoying a much-needed spring break, and have been focusing on potentially testing out of one of my future classes. For this project, I was assigned a discussion on the assumptions that hot spot maps can make and how that can influence crime analysis decisions and I was also tasked with a lab that had me create several types of crime analysis maps using ArcMap 10.6. While the first two portions of the lab had me create choropleth and hotspot maps the portion I would like to focus on is the last part using three various forms of hot spot maps to predict future crime trends. The three main methods can be seen below and I will briefly discuss them in depth, as well as discuss which I think is the most suitable.
 The map above compares the three types of crime analysis hotspot maps in question. The first is a grid-based thematic map. To create this I took burglaries from the year 2007 and spatially joined them together with a grid of the area. I then selected the top 20% of grids that had the highest counts of burglary crimes in each after excluding cells with a count of '0'. I then created a polygon of this grid that shows where the highest burglary activity is located throughout the region. Next, I created a Kernel Density map. To do this I took and created a density map of the burglaries from 2007 and found where the density was highest, this gave me a completely different result as I used a half-mile search radius to help shape my map. Finally, I made a Local Moran's 1 map that uses cluster and outlier analysis to find areas of high concentrations of crime near other areas of high concentrations of crime. I then stacked these three map types to get a comparison and find which method would best suit crime forecasting.

After looking into the numbers and analyzing the data I found that if I were to be a police chief or a sheriff, I would want to use a Local Moran's map. This is because it is neither too big (like the grid) or too small (like the kernel density) to focus the efforts and resources on. I also notice that the areas of high concentration in the Moran's map are pretty central to my data and share the same geographic location with the areas of crime with the other two analysis maps. When looking at the numbers, I found that when I compared the 2008 burglary data to the data from 2007, the Local Moran's map did the best at forecasting for the next year.

I have been fortunate to have a background in Crime Analysis through an amazing opportunity to be an intern analyst at the Jacksonville Sheriff's Office. Crime analysis is one of my desired fields of interest and creating maps like this has always been one of the things I love most about GIS. It has been an absolute pleasure pursuing this project, and as always, ~ Map On

Sunday, March 10, 2019

GIS 5007L - Module 8: Isarithmic Mapping

Hello Everyone! 

After an agonizing week last week with choropleth mapping, I am happy to say that I am back on track and mapping ever forward! This weeks lab was all about isarithmic mapping. Isarithmic mapping is a mapping style that utilizes continuous data to give the reader a visual idea of the data in question. Continuous data can include temperature, elevation, precipitation, and many others. In this weeks lab, I was tasked with creating two maps using isarithmic mapping for precipitation levels in the state of Washington. This data was collected over a 30 year period from various weather locations to show the average annual rainfall in the state by the Oregon State University PRISM Group. This data was then interpolated (analytically estimated the areas between monitoring stations) using the PRISM method which takes factors such as elevation, slope orientation, and coastal proximity into account and shows how said factors can influence precipitation levels. During the lab I made two different maps, one in continuous tones, and the other in hypsometric tints with contours, so let's get right into it!
The map above is a Continuous Tone color scheme for precipitation with a hillshade (elevation) under the color ramp. As you can see the transitions between areas of higher precipitation levels and lower are quite smooth and the legend reflects this. Areas in dark blue are areas where precipitation levels are highest, and areas in red areas where precipitation amount is lowest.


The second map I made was a Hypsometric Tint map. As you can see, the data is broken up into 10 classes allowing for a more distinguishable map to be made. These classes are separated by contour lines which allow the viewer to distinguish between the amounts of rain across the state. For this map, I believe that this map style is better at representing this data as the contour lines really emphasize the changes in elevation and precipitation that reflect said elevation changes. In this map is a brief description of how the data was derived and interpolated so the target audience and you, the reader can understand. This project has been my all time favorite this semester and a much-needed sigh of relief after the choropleth disaster. I look forward to sharing my future progress with you and as always,

~Map On!