Wednesday, June 28, 2017

GIS 4102 Module 6 Python Geoprocessing

This weeks assignment was to create a script that performed three geoprocessing functions on a feature. The first part of the script adds XY coordinates to the features attribute table, this was accomplished using the AddXY_management module, the next step of the script created a 1000 Meter buffer around the feature I used the Buffer_analysis tool for this portion and the last part of the script dissolved the previously created buffer and created a new feature, I used Dissolve_management to accomplish this. After each portion I also needed to print out the messages from each tool after it had run I use GetMessages() for this.

Below is the screenshot from the PythonWin interactive window showing that the script ran successfully .


Sunday, June 25, 2017

GIS 4048 Module 5 HLS DC Crime Mapping

This weeks lab began our section on the Department of Homeland Security applications in GIS. This module focused on how Law enforcement agencies use GIS to improve public safety.  For the lab we needed to produce two maps which looked at ways to analyze crime in Washington D.C. The first map looked at the amount of crime which occurs in proximity to the current police stations in the district using proportional symbols to illustrate, and where the best place to build a new substation to reduce strain on law enforcement personnel and resources. The second map is a kernel density map which shows burglary, homicide, and sex abuse crimes. Some of the tools used in this lab were, creating a address locator, creating graphs, crating multiple ring buffers, preforming spatial joins, and using the Density toolset. Below are the two maps that I produced for this assignment. The biggest issue I had was trying to get all the information to fit on the first map with out making it seem cluttered.




Wednesday, June 21, 2017

GIS 4102 GIS Progamming Module 5: Geoprocessing 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.