Wednesday, June 21, 2017

GIS 4102 GIS Progamming Module 5: Geoprossing in ArcGIS

In this weeks lab we began working with models in ArcGIS and creating a python tool to automate geoprocessing. In the lab we needed to create a tool that selects all areas a basin feature that are currently or potentially suitable for farming. We did this first my creating a model in ArcGIS , we then needed to export the model to python and modify it to work outside of an ArcGIS session. Some of the geoprocessing tools that were required to complete the analysis were the Clip tool, the Select tool and the Erase tool. The clip tool clipped all soils from the soils feature to the extent of the basin feature. The select tool selected all soils that are classified as  "Not prime farmland", and the erase tool was used to erase all not prime farmland from the basin feature. The picture below shows the final output of both the model and the script tool.


Sunday, June 18, 2017

GIS 4048 Module 4 Natural Hazards: Hurricanes

During this weeks lab we looked at Hurricanes, specifically Hurricane Sandy , which made landfall near Atlantic City, NJ in October of 2012. For the lab we tasked to create two maps, one which showed the path of the hurricane from its beginning as a tropical depression  to its final phase as a post-tropical cyclone. This evolved creating marker symbols, using the Points to Line tool, and Graticules to our maps.
For the second map we needed to create a damage assessment map showing pre-storm aerial imagery and post-storm aerial imagery in order to determine the amount of damage caused by the storm within the study area , near Tom's River NJ. Some of the ArcGIS skills that were used in creating this map were the effects toolbar, creating attribute domains , and assigning domain properties and coded values. The final part was to used the aerial imagery to asses the damage and classify the structural damage that occurred in the wake of the storm.  Below are the two maps that I created for this lab.






Wednesday, June 14, 2017

GIS 4102 Module 4: Debugging and Error Handling

This weeks lesson focused on identifying errors in our scripts, we learned about the three types of errors that can be generated in Python, syntax errors which will not allow the script to be compiled , exceptions which will stop the script from running mid-process , and logic errors which will allow the script to run but will produce undesired results.  
The assignment this week was broken into three parts , the first one was a script which had two errors in it that were preventing the script from running, Once I was able to find and fix the errors the script printed out a list of the names of all the fields in a shapefile's attribute table.


In the second part of the lab we need to find eight errors/exceptions in order for the script to run successfully ,this was somewhat challenging I first used the check button to identify all the syntax errors, once I fond and corrected these I ran the script in debugging mode , even though I was able to find the errors this way I needed to do some reading from chapter 10 in the text to find out how to actually fix the exceptions. Below is the screenshot of the interactive window was the script was fix and successfully run.



The last part of the assignment was to not fix the errors in a script but to use an try-except statement to catch the exception and print an error message , the script had two parts and the errors were in the first part, by using the try-except statement the exception was able to be trapped and a error statement printed out, and it also allow the script to continue running to the second part which had no errors in it, below is the screenshot of the final result from this part of the assignment.



















Sunday, June 11, 2017

GIS 4048 Module 3 Natural Hazards - Tsunamis

This weeks assignment was to look at how GIS can be used to prepare, respond to, and aid in the recovery of a tsunami event, The event that we explored in the lab was the 2011 tsunami that hit Northeastern Japan and the impact it had on the Fukushima Nuclear Power plant.
In the first section of  the exercise covered spatial data management skills , this included building a file geodatabase and using Feature datasets to organize related feature classes. and Raster datasets. We explored and utilized several new tool in this portion such as Build Raster Attribute Table , and Mosaic to New Raster.
In the  second part of the lab  covered creating the Fukushima radiation exposure evacuation zones. This was accomplished using the Multiple Ring Buffer tool and setting the buffer distances to 3,7,15,30,40, and 50 miles from the Fukushima power plant.
The final part of the lab was on the tsunami run up, several spatial analyst tools were used in this step and we also created a Model in model builder to create the run up evacuation zones, and the cites, roads and of course the power plant that fell with in these evacuation zones.

The last step was creating the map with was a bit difficult due to all the information that needed to be displayed and I had some issues trying to get the chart to display correctly with in my layout. Below is the final product of this lab.




Thursday, June 8, 2017

GIS 4102 Module 3 : Fundamentals of Python Part II

In this weeks assignment were to edit an incomplete script, first we needed to first import the random module then find two errors in the for loop in the first part of the code that were causing the code to not run properly . Once the code was corrected we need to create a while loop that would 20 random numbers between 0 and 10 and add them to an empty list, then print the full list, this part gave me a little trouble until I realized I was over complicating it. Next we had to write another block of code that would remove all instances of a certain number and print a different statement depending on the results of the code, I used a if and else statement for the first place , then I used a while loop to print the list with the numbers removed, below is the result of the script.


Saturday, June 3, 2017

GIS 4048 Module 2 -Lahars Lab

 This weeks lab focused on the Geo-hazard Lahars or volcanic debris flows, which are fast moving  water saturated mixtures of soils and rock fragments. The goal of the lab was to use GIS to identify potential inundation zones for the Mt. Hood Oregon Area.

The first step in the process was to define a default geodatabase of the project. Next using the XY tool Mt. Hood was added to the map by imputing the Longitude and Latitude coordinates and converting the graphic to a feature class.  Next a mosaic raster was created from two separate DEMs , using the data management tools.

 For the rest of the project the Spatial Analyst toolset was used including several from the Hydrology tools. First the fill tool was used to prevent water flow from pooling. The next tool used was the flow direction tool which assigns each pixel in a raster a value representing the direction of flow across that cell. The flow accumulation tool was used to calculate for each the total number of  other cells that flow into it. Some other tool that were explored in the lab were the Int tool under the Math toolset, which converts floating point raster into a integer raster, the con tool is used to set conditions for each cell to be evaluated as either true or false, and finally the stream to feature tool which creates a polyline feature class from the con tool output.     

The last part of the lab was hazard planning which involved identifying the cites and schools effected by the lahar inundation zones by creating a half mile buffer around the streams and evaluating cities and schools fell with in this buffer. Finally U.S Census block data was used to determine the population numbers that would be effected by Lahars in the event of an volcanic event.

Below is the final map showing inundation zones and the population, cities and schools that fall with in those zones.





Wednesday, May 31, 2017

GIS 4102 Module 2 - Python Fundamentals Part 1

In this weeks lab we began working with basic functions and methods , we also learned about strings and list. In this weeks assignment we had to create a script that would produce a list from a string of our full names, the script then needed to be able to find our last name from that list  and print it , next it needed to find the character length of our last name and multiply it by three and print out the result. I was able to accomplish this in five steps, first write the string and assign it to a variable, next I created a list from the string using the method split and assigned that result to a variable and using indexing printed the result which was my last name, next I needed to use the function len to find the character length of my last name , then finally I needed to write a statement that would multiply the length by three and then print the result. Below is a screenshot of the final output.