This week we continued our study of natural hazards by compiling two maps: One that depicts the path of Hurricane Sandy and another that is a Damage Assessment of the same Hurricane. The below excerpt is from, "Tropical Cyclone Report Hurricane Sandy (AL182012) 22-29 October 2012":
"Hurricane Sandy was a classic late-season hurricane in the southwestern Caribbean Sea. The cyclone made landfall as a category 1 hurricane (on the Saffir-Simpson Hurricane Wind Scale) in Jamaica, and as a 100-kt category 3 hurricane in eastern Cuba before quickly weakening to a category 1 hurricane while moving through the central and northwestern Bahamas... The system restrengthened into a hurricane while it moved northeastward, parallel to the coast of the southeastern United States, and reached a secondary peak intensity of 85 kt while it turned northwestward toward the mid-Atlantic states. Sandy weakened somewhat and then made landfall as a post-tropical cyclone near Brigantine, New Jersey with 70-kt maximum sustained winds. Because of its tremendous size, however, Sandy drove a catastrophic storm surge into the New Jersey and New York coastlines. Preliminary U.S. damage estimates are near $50 billion, making Sandy the second-costliest cyclone to hit the United States since 1900."
Hurricane Sandy was certainly a major Natural Hazard event in 2012, and it makes sense for us to study this event today. Our objectives for this week's lab were to utilize several tools to create and display the storm path and conduct a damage assessment in the area where the storm made landfall. Some of the tools I used were:
- Select by Attribute
- Add X-Y data
- Points to Line Tool
- Adding Graticules
Using the Points to line tool was interesting. The tool can be found at:
ArcToolbox > Data Management Tools > Features > Points to Line Tool
I took the points provided with the Sandy Track Events file and utilized the Points to Line tool to create the path that Sandy followed up to the New Jersey shore. Then, I symbolized the storm intensity using an appropriate color ramp and then I added the storm symbol to my map. Another interesting thing I did was add Graticules to my map. This was indeed a first for me, and fortunately, a relatively straight forward task to accomplish:
From Data Frame Properties > Grids > New Grid. Select Graticule: divides map by meridian and parallels and, there you have it. Of course, you must be in the Layout view to see the Graticules (another Lesson Learned).
To create the Damage Assessment map, I used several aerial images to make a Raster Mosaic.
I added the imagery to DamageAssessment.gdb by right-clicking on the GDB > New > Mosaic Dataset. After adding all the layers such as the NJ_Counties, NJ_Municipalities, NJ_State and NJ_Roads, it was time to create some data!
One of the main objectives for this week's lab was to make comparisons of the before and after aerial imagery where Sandy came ashore in New Jersey. The Effects toolbar contains a "Swipe" tool that allows you to peel the selected layer back and see underneath it. Cool! Only, you have to be in Data View to use the tool...I was in Layout view when I started this part and the tool was disabled; another good lesson learned.
I created the Damage Assessment Table after digitizing several homes from the post storm aerial and I did remember to save my edits! Here's a look at my final two maps.
Friday, June 12, 2015
Thursday, June 11, 2015
GIS Programming- Debugging & Error Handling
This week in GIS5103- Programming, we worked on three Python scripts using Debugging and Error Handling techniques. The main focus was learning to use the Debugging tool in PyhthonWin. I found the "step" function to be extremely useful. Additionally, using the "step over" function prevents the internal libraries from popping-up when an error is detected.
This method for checking your script is great because the Debugging tool will indicate your error and display an error code that can be very useful in finding the solution to get your code to run from start to finish. We examined three scripts this week. Script 1 was intended to print out the names of all fields on the Module4/Data/parks.shp attribute table, but there were two errors/exceptions I had to find first. Using the Debugging tools from above, I was able to correct the errors and successfully run the script:
| step over button |
The second script was supposed to print out the names of all layers in each data frame of the Module4/Data/TravisCountyAustinTx.mxd map, but it too had eight errors/exceptions. Using the tools above and going line-by-line, I found all eight errors and was able to run the script:
The third and final script had a Part A and Part B. Part A had an Exception we were not to fix. Instead we would use the try-except method. The script was intended to run Part A; encounter an error; and print an error statement; Part B would run successfully, printing out the Name, Spatial reference, and Scale of the data frame.
There were many steps I used to complete script 3. Below are the steps I followed to apply the try-except statement:
1. Initially, I ran my code normally, not using the Debugger tool, to see what error was present.
2. After I detected which line of code had an error, I reviewed the try-except portion of the lecture video.
o I was concerned with the placement of the try- except block of code.
o After reviewing both the video and the text book, I had a good idea of where to place my try-except code
3. Initially, I placed the block of code before and after line 13 (mapdoc = arcpy.mapping.MapDocument() )
4. My challenge was to determine the, beginning and ending points for the try-except block of code, so I used a line-by-line approach until I got my script to run correctly.
My lesson learned was to take note of the blocks of code as each step or function relates to its placement in the PythonWin window. I found it helpful to add empty lines between each action in the script as I used the step-over function.
Friday, June 5, 2015
Python Fundamentals II - A Dice Rolling Game
We continue our journey through the world of Python. This week we picked-up where we left off last week with Python Fundamentals. Learning a new language takes time and practice. I put in quite a bit of time this week and I now have a better understanding about Python and functions, and methods, and syntax, but I still have a long road to travel.
For this week in GIS 5103 Programming, I created a scrip that runs a dice rolling game based on the players’ name length, then it creates a list with 20 random numbers in it. It also has a conditional statement with a nested while loop that removes all instances of an “unlucky” number (I selected 6) from the list. Below I explain one of the steps in my script-writing process.
For this week in GIS 5103 Programming, I created a scrip that runs a dice rolling game based on the players’ name length, then it creates a list with 20 random numbers in it. It also has a conditional statement with a nested while loop that removes all instances of an “unlucky” number (I selected 6) from the list. Below I explain one of the steps in my script-writing process.
Removing numbers from my list.
1. To remove a number from a list, the command is: number.remove(specify the number)
2. For my script, I created a “list” so my remove command looked like: list.remove(specify the number)
3. I previously defined my “unlucky” number as the variable “k”, so I wanted “k” removed from the list: list.remove(k).
4. However, the command “remove” only removes the first occurrence. Therefore, I had to define a loop
5. To define the loop, I used:
q = 1
while q <=20
k=6
list.remove(k)
Notes on my progress:
1. I had numerous issues with this script: I created several infinite loops (Remember to use “break” or define that loop with the “sentry” on top)
2. My script disappeared from my S-drive for unknown reasons: I saved my script on my home desktop and could open it using Notepad. This must become first nature for me
3. There are many ways to write a script; I have a lot to learn
Tuesday, June 2, 2015
GeoHazards: Tsunami Evacuation
This week in GIS4048 Applications, we continue our journey through Hazardous terrain. This week we are discussing Tsunami's. Specifically, we were charged to build an evacuation map for the Fukushima II Nulcear Power Plant that was flooded by the Tsunami that hit Japan on March 11, 2011. This Tsunami, that hit the northeastern coastline of Japan, was the product of a 9.0 earthquake.
- Causes human death (average death rates are estimated at 50% of the population but have been reported up to 80%.)
- Leaves people homeless, destroys other property.
- Psychologically traumatic.
- Spreads contaminates to water and food sources.
Our objective is to provide an analysis of both the Radiation hazard and the runup evacuation zones caused by this Tsunami. There were many tasks to accomplish. Below I outline two major tasks.
After this, I found, by using Select by location the cities that fell within the prescribed distances above
A Tsunami is an incredibly destructive force that:
- Causes human death (average death rates are estimated at 50% of the population but have been reported up to 80%.)
- Leaves people homeless, destroys other property.
- Psychologically traumatic.
- Spreads contaminates to water and food sources.
Our objective is to provide an analysis of both the Radiation hazard and the runup evacuation zones caused by this Tsunami. There were many tasks to accomplish. Below I outline two major tasks.
Task#1 Fukushima Radiation Exposure Zones
To create the Fukushima Radiation Exposure Zones, I had to develop my map so that I could look at the distances to determine the possible population totals that might be effected by the nuclear radiation from Fukushima II. To accomplish this I needed several layers of data. I included the following layers:
a. JpnBndOutline
b. NuclearPwrPlnt
c. JapanCities
d. Roads
e. NEJapanPrefectures
With these layers, I could find Fukushima II by manually selecting from the NuclearPwrPlnt attribute table the plant I was concerned with. From this selection I made a layer with the one point: Fukushima II Nuclear Power Plant.
At this point I needed Population information; I added Japan Cities and selected those Cities that were within 50 miles of my NucPwrPlnt.
Next, I could use the multiple rings tool to place rings at: 3, 7, 15, 30, 40 and 50 miles from the Fukushima II, Nuclear Power Plant.
ArcToolBox>Analysis Tools > Proximity > Multiple Ring Buffer
The last step for me was to ensure I had selected an appropriate symbology for the radiation zones
.
- The first attempt I forgot to deselect <all other values>
- Subsequently, I reviewed several color ramps before selecting the red to green ramp.
- I selected Category= Unique value and then deselected the borders for each color
Here is my result:
Task#2 Model Builder: Develop Tsunami Runup Zones
This was a very interesting portion of this week's lab. Model Builder is a great tool; you just have to stay organized and save your model when done. To get to the Model Builder you open ArcCatalog then add a ToolBox to your GeoDataBase (right click on the .gdb and select New > Toolbox). Once you have added the Toolbox, you can right click on it and select New > Model
After I completed and successfully ran my model, I went back to it to do some editing, however, I could not open it. I must not have saved it properly (though I thought I had because it appeared in ArcCatalog). So, I re-accomplished the model, getting two-times the practice on this part of the lab, and then I ran the model and SAVED my work.
Lesson Learned: Ensure my work is always SAVED.
Sunday, May 31, 2015
Python is #1
I have had some minor exposure to Python while I was taking a course on Drupal, an Open Source Configuration Management System (CMS) used to build websites ( here’s a site I built for my wife: http://dev-rebeccas-creations-2014.gotpantheon.com/).
But, by no means would I claim to be experienced with this language. So, that is why I chose an article about Python for this Participation Exercise. The title of the article is, “Python is Now the Most Popular Introductory Teaching Language at Top U.S. Universities.”
According to this article, “Top-ranked CS departments at MIT and UC Berkeley recently switched their introductory courses to Python.” This tells me we are in great company as we endeavor to learn Python and apply what we learn to GIS. Though there were some comments about Python hiding too much, that is, the code is “built-in”, and the user does not have to create code from scratch, most of the article was very positive towards Python. Personally, I like the “Built-in” tools and features that do not require you to develop code because it saves time and troubleshooting. Additionally, there are numerous examples of code for various applications that you can copy and use without having to develop them completely on your own. As we progress through this course I am positive we will develop more code and find endless uses for Python in our GIS endeavors.
Thursday, May 28, 2015
Natural Hazards: Lahars and Module 2
It has started again. I can feel my pulse trying to jump out of my body. I have not had so much excitement in a while. Module 2 for GIS Applications was an exercise in learning about Natural Disasters, such as Meteor strikes, Hurricanes, Floods, and, my map of the day: Lahars. The lab consisted of using several new tools including:
- Hydrology toolset.
- Mosaic to New Raster (Data Management)
- Fill tool
- Flow Direction
- Flow Accumulation
- Conditional Evaluation of Rasters
- Raster to Feature
- Using Raster Math > Math > Int
- And using Spatial Analyst Toolbox > Hydrology > Stream to Feature
The objective was to determine where Lahars or streams would flow in the event that Mt Hood erupted. "Lahars, or volcanic debris flows, are water-saturated mixtures of soil and rock fragments that can travel very long distances (over 60 miles) and as fast as 50 miles per hour in steep channels close to a volcano." (Oregon Geology Fact Sheet)
I also had to take two DEMs and combine them to make one mosaic to then compute the flow by changing the cells to integers from floating points. I used the Spatial Analyst Toolbox and executed the Math > Int tool. This converted the floating point raster to an integer raster-- this was way cool!
After this step I could use other tools such as the Con Tool to control the output value for each cell. Ultimately, I wanted to arrive where I could determine the flow or streams the Lahars would follow and what schools, cities and the amount of population that would be at risk. The below map shows that, in the event that Mt Hood erupts, a number of schools and cities would be in danger. Also a large population, 58, 260 people, would also be in the path or near enough the Lahars to be at risk.
- Hydrology toolset.
- Mosaic to New Raster (Data Management)
- Fill tool
- Flow Direction
- Flow Accumulation
- Conditional Evaluation of Rasters
- Raster to Feature
- Using Raster Math > Math > Int
- And using Spatial Analyst Toolbox > Hydrology > Stream to Feature
The objective was to determine where Lahars or streams would flow in the event that Mt Hood erupted. "Lahars, or volcanic debris flows, are water-saturated mixtures of soil and rock fragments that can travel very long distances (over 60 miles) and as fast as 50 miles per hour in steep channels close to a volcano." (Oregon Geology Fact Sheet)
I also had to take two DEMs and combine them to make one mosaic to then compute the flow by changing the cells to integers from floating points. I used the Spatial Analyst Toolbox and executed the Math > Int tool. This converted the floating point raster to an integer raster-- this was way cool!
After this step I could use other tools such as the Con Tool to control the output value for each cell. Ultimately, I wanted to arrive where I could determine the flow or streams the Lahars would follow and what schools, cities and the amount of population that would be at risk. The below map shows that, in the event that Mt Hood erupts, a number of schools and cities would be in danger. Also a large population, 58, 260 people, would also be in the path or near enough the Lahars to be at risk.
Sunday, May 24, 2015
Python Fundamentals
In this Module for GIS 5103 (GIS Programming) we began to learn the fundamentals of Python. I learned about using Functions, many that are built into Python (e.g. dir(__builtins__) - this gives you a list of builtin Python functions). For this lab, I used the functions:
len: This function counts the length of a string
* : This is the multiplication function
And I used the Method, Split: This splits apart a string as in, lastNameList.split(" "). Where, lastNameList is the Object; split is the Method and (" ") is the argument.
Here is a brief description of what I did for this lab:
len: This function counts the length of a string
* : This is the multiplication function
And I used the Method, Split: This splits apart a string as in, lastNameList.split(" "). Where, lastNameList is the Object; split is the Method and (" ") is the argument.
Here is a brief description of what I did for this lab:
1. In order to calculate the length of my last name, I had to define my last name:
o listName=stringName.split and then, print listName[-1] (this will print the last name).
2. Then, I had to determine which function I should use to count the length of my last name.
3. I researched the available functions online and found “len.”
o len(object) -> integer
Return the number of items of a sequence or mapping.
4. I followed the syntax of: function(object).
5. My code for this process was: len(lastNameLen)
Subscribe to:
Posts (Atom)





