Wednesday, July 27, 2016

Creating Custom Tools

This week, we created a custom toolbox and modified a script tool to go with it.


Here is what the script tool dialog box looks like.

Here is what the tool dialog window looks like after using .AddMessages() in the script.

Here is a list of the basic steps required to make a custom toolbox and script tool.
1.       Create/modify a python script.
2.       Create a custom toolbox.
3.       Add your script tool to the custom toolbox using Add>Script after right-clicking toolbox.
4.       Set the parameters of the tool in the properties to match your script.
5.       Edit your script if necessary by setting the parameters of the script using arcpy.GetParameter()
6.       Modify print statements to arcpy.AddMessage() statements to ensure messages appear in the geoprocessing environment tool dialog box.
7.       Share your toolbox, tool, and script by compressing your script and parent toolbox into a compressed (zip) folder.


Tuesday, July 19, 2016

Working with Rasters

In this week's lab, we worked with rasters and the arcpy.sa module. We were asked to write a code that would reassign values to an assigned raster, as well as reclassify those values to the raster. We created temporary rasters for Slope and Aspect, performed calculation statements from them, and combined the results of those calculations with the reclassified raster to create the raster output below. We created this code all within an if/else statement for checking the Spatial Analyst Extension, as these wont compile unless you have a license for it.

Here is a screenshot of my output raster below:

Here is a flowchart for my script below:

This is the step I had the most difficulty with:
1.       I had the most difficulty with the Slope and Aspects statements in part f of step 3.
2.       I kept getting only 0 (in other words, one solid color on my raster) as a result in my output raster, as it would only recognize the landcover raster.
3.       I realized I was missing my Aspect variable before the four temporary statements (I had the Slope variable already made, I guess I overlooked Aspect somehow), also I had to capitalize Slope and Aspect in the variable assignment and the four statements.

Thursday, July 14, 2016

Remote Sensing

For this assignment, we classified the site Monk's Mound, located in Cahokia, Illinois. Cahokia Mounds is the largest prehistoric earthworks north of Mexico and was inhabited from ca. 600-1400 AD. It originally consisted of 120 earthworks, but today is reduced to 80. It is estimated that around 40,000 people may have lived in Cahokia at its peak, yet the reason for it's decline is still unknown. Although there is little known about Cahokia, it is still an important national landmark.

Supervised classification allows you to choose how many classes you use and their general location. I made six classes based off of what I predominantly saw in the Cahokia TIFF image. There is still some slight error in the classification, but I had more control over classification than with unsupervised.

 Unsupervised classification automatically classifies areas for you based on the number of classes you desire. This one has eight classes, with almost every single one merging into the class of another (based off toggling back and forth between images). Unsupervised is prone to more error with a fewer number of classes specified.

Wednesday, July 13, 2016

Writing Geometries

   In this lab we worked with a river shapefile, set up a search cursor with nested for loops in order to declare some of its geometries, and wrote those geometries to the text using the .write method. Below is a snip of what a portion of the text file result looks like.



Here is the flowchart of the code, with pseudocode below.


Pseudocode:
Start
Import modules
Import env
Set workspace
Set variable

Create text, enable writing
Set SearchCursor array 
For loop
Set vertex ID variable to 0
For loop/get.Part method
Element 0 of cursor array declared (feature #)
##Vertex ID printed
Element 1 of cursor array declared (x, y coords)
Element 2 of cursor array declared (name)
Vertex ID variable increased by 1
Write argument declared 
Print statement showing all five elements in single line format
Delete row and cursor
Close file

Sunday, July 10, 2016

Peer Review #2

Geoprocessing tool to model beach erosion due to storms: application to Faro beach (Portugal)
 
By: Almeida, et. al
 
   This article introduces a geoprocessing tool, called GEOSTORM, which was created with the purpose of allowing users to run Kriebel and Dean’s storm erosion convolution model in ArcMap. This GIS application supports the preparation and conversion of the data produced by the model into a format usable in a GIS environment (i.e. shapefiles, etc). The application consists of two parts: Module 1, which is where the user inputs data related to their study area, and Module 2, the actual storm erosion model.

   The authors state that each module was designed with different programming languages (Python and Matlab), but do not explain the reasoning behind this. They do communicate through ArcObjects using VBA. I would like to have known if this is more or less efficient, or if it was the only way to get Kriebel and Dean’s model to run in ArcMap efficiently.

   Module 1 and 2 setup and directions are in need of more explanation. While their explanation is ok, it would not hurt to be more specific and detailed for each step the user needs to take to set up and go through the modules. The study scenario was a little unclear in some areas, and I felt like some aspects of the study could have been explained better for those outside of the discipline. Figure six is a good example and helped me better understand the results of the study.

   Overall, this application/tool sounds like it is useful and could help out coastal decision-makers prepare for incoming storms. However, the information concerning it is lacking and seems rushed out. I would like to have had more background information about the processes of each module, considering potential users would be most interested in how it works.

http://search.proquest.com.ezproxy.lib.uwf.edu/environmentalscience/docview/1675866765/abstract/9065FD92DC0B493DPQ/40?accountid=14787

Wednesday, July 6, 2016

3D Modeling

   In this module's lab, we used ArcScene to create a 3D representation of a shovel test site on the College Lake County Campus in Grayslake, Illinois.

Here is my fly-through animation showing the strata of the shovel test sites.

This image shows the geological layers belonging to each strata. The red-blue scheme is representative of high to low depth.

This image shows the cross section I completed of a proposed cable trench through the study area. The trench runs from the NW to the SE, in a diagonal line.

This is the map I made of the cross section for the proposed cable trench.


This is the map I made for the geological layers and their strata.