exercise 12 mapping floods in...

20
1 Exercise 12 Mapping Floods in Bolivia: Download MODIS satellite imagery, trace flood extent and estimate how many people are affected. Due: Thursday, March 5, by the start of class. Goal: Introduction to editing and more raster geoprocessing. Download MODIS satellite imagery from the NASA website. Readings: Read Bolstad Chapter 6, especially page 214‐223. Datasets: Exercise12A.zip and Exercise12B.zip (wait with downloading, see step 55) The MODIS satellite imagery can be downloaded from the NASA website. The other data needed can be downloaded from http://geode.colorado.edu/~geol3050 Make sure you “UnZIP” your data under D:\GIS_myname\ or your flash drive so you can see them with ArcGIS. Introduction Step Back to 2007 and Assess Today’s Situation in Bolivia… On February 22, 2007 you received the following information from the NASA Earth Observatory: TORRENTIAL RAIN BRINGS FLOODS AND LANDSLIDES TO SOUTH AMERICA Torrential rain pounded Brazil, Bolivia, and Peru during December 2006 and January 2007, causing floods and landslides. * http://www.unicef.org/emerg/bolivia_39044.html This message was sent by a daily NASA image service the “Natural Hazards”, that usually obtains an image from the MODIS Aqua or Terra satellites. You can subscribe to this service and get a daily e-mail to learn what is going on in the world with regard to natural phenomenon and disasters!! The same day your contacts at Museo Noel Kempff Mercado in Santa Cruz, Bolivia are trying to get a hold of you to get estimates on the extent of the current flooding: “The skies have been clear the last three days. El Nino is OVER. Now might be the ideal time for an image, end of rains at maximum inundation. Check the Beni river too (large grassland ecosystem N of Santa Cruz), the news reports there are also ominous.”

Upload: others

Post on 20-Jun-2020

17 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Exercise 12 Mapping Floods in Boliviageode.colorado.edu/~geol3050/Exercises/Ex12-Bolivia-Floods.pdf · Exercise 12 Mapping Floods in Bolivia: Download MODIS satellite imagery, trace

1

Exercise 12 Mapping Floods in Bolivia:

Download MODIS satellite imagery, trace flood extent and estimate how many people are affected.

Due: Thursday, March 5, by the start of class. Goal: Introduction to editing and more raster geoprocessing. Download MODIS satellite imagery from the NASA website. Readings: Read Bolstad Chapter 6, especially page 214‐223.

Datasets: Exercise12A.zip and Exercise12B.zip (wait with downloading, see step 55)

The MODIS satellite imagery can be downloaded from the NASA website.

The other data needed can be downloaded from http://geode.colorado.edu/~geol3050 Make sure you “UnZIP” your data under D:\GIS_myname\ or your flash drive so you can see them with ArcGIS.

Introduction Step Back to 2007 and Assess Today’s Situation in Bolivia…

On February 22, 2007 you received the following information from the NASA Earth Observatory:

TORRENTIAL RAIN BRINGS FLOODS AND LANDSLIDES TO SOUTH AMERICA Torrential rain pounded Brazil, Bolivia, and Peru during December 2006 and January 2007, causing floods and landslides.

* http://www.unicef.org/emerg/bolivia_39044.html

This message was sent by a daily NASA image service the “Natural Hazards”, that usually obtains an image from the MODIS Aqua or Terra satellites. You can subscribe to this service and get a daily e-mail to learn what is going on in the world with regard to natural phenomenon and disasters!!

The same day your contacts at Museo Noel Kempff Mercado in Santa Cruz, Bolivia are trying to get a hold of you to get estimates on the extent of the current flooding:

“The skies have been clear the last three days. El Nino is OVER. Now might be the ideal time for an image, end of rains at maximum inundation. Check the Beni river too (large grassland ecosystem N of Santa Cruz), the news reports there are also ominous.”

Page 2: Exercise 12 Mapping Floods in Boliviageode.colorado.edu/~geol3050/Exercises/Ex12-Bolivia-Floods.pdf · Exercise 12 Mapping Floods in Bolivia: Download MODIS satellite imagery, trace

2

Assignment

What is the extent of the flooding of the Rio Grande in Bolivia? How does this year’s flood compare in area to flood events from these 2 years (2006 and 2007)? How many people are affected by the floods?

To map this year’s flood you have to go through the following steps:

A. Determine what was going on in Bolivia.B. Download Satellite Imagery (MODIS) from the NASAwebsite.C. Add MODIS Images to ArcMap.D. Create a new shapefile for the flood data in ArcCatalog.E. Trace the flood extent (Edit the shapefile).F. Calculate the flooded area (in hectares).G. How many people are affected by this flood?H. Make one Layout with two Data Frames:

• One with the false color 7, 2, 1 image of the study area• One comparing the flooded areas of the last 3 years.

(Mentioning the people affected this year and the area flooded).J. Update the Metadata for the newly created file.

NASA MODIS Imagery

From the NASA website http://modis.gsfc.nasa.gov/ Data resolution is 250m

MODIS (or Moderate Resolution Imaging Spectroradiometer) is a key instrument aboard the Terra (EOS AM) and Aqua (EOS PM) satellites. Terra's orbit around the Earth is timed so that it passes from north to south across the equator in the morning, while Aqua passes south to north over the equator in the afternoon. Terra MODIS and Aqua MODIS are viewing the entire Earth's surface every 1 to 2 days, acquiring data in 36 spectral bands, or groups of wavelengths (see MODIS Technical Specifications). These data will improve our understanding of global dynamics and processes occurring on the land, in the oceans, and in the lower atmosphere. MODIS is playing a vital role in the development of validated, global, interactive Earth system models able to predict global change accurately enough to assist policy makers in making sound decisions concerning the protection of our environment.

A. Determine what was going on in BoliviaCheck out the web pages given above:

• Make sure you know where Bolivia is.• Make sure you know where the study area is within Bolivia.• Convince yourself how serious the situation is.

B. Download Satellite Imagery (MODIS) from the NASAwebsite1. Go to the following webpage (preferably use Chrome!)

http://lance‐modis.eosdis.nasa.gov/imagery/subsets/?project=fas

2. Click on FAS Bolivia3. It will open the latest images.4. When were they acquired?5. Fill in the circled parts below as I did and leave everything else alone:

Page 3: Exercise 12 Mapping Floods in Boliviageode.colorado.edu/~geol3050/Exercises/Ex12-Bolivia-Floods.pdf · Exercise 12 Mapping Floods in Bolivia: Download MODIS satellite imagery, trace

3

6. Hit Download and it will think for a minute and then save a zip file to your computer.7. Extract the zip file and while doing so change the name to TerraTrueColor2‐22‐20078. Just to see what it is, open the *.jgw file in Notepad, as it just contains text, describing the pixel

size of the image and the coordinates.• Browse to the file, right click on it and say OPEN WITH…• Open with NOTEPAD.

9. A description of what a world file is in Appendix A.10. Repeat step 5, leaving everything the same but adding in the 7,2,1 –band combination. This is a

false‐color image, which means that infra‐red bands instead of the visible light bands were used:

Water ranges from black to light blue in these images, which were made with both infrared and visible light. Clear water is black, while sediment‐laden water is lighter in color. Clouds are pale blue, and plant‐covered land is green. Fires are outlined in red.

11. Extract the zip file and while doing so change the name to TerraFalseColor2‐22‐200712. Repeat step 5 and download the TrueColor Terra data for 11/11/2006, leaving the other options the

Page 4: Exercise 12 Mapping Floods in Boliviageode.colorado.edu/~geol3050/Exercises/Ex12-Bolivia-Floods.pdf · Exercise 12 Mapping Floods in Bolivia: Download MODIS satellite imagery, trace

4

same (resolution and file format). This is an image from a low‐cloud day in non‐flood conditions, so you can compare flood to no‐flood conditions.

13. Finally, repeat step 5 for the Terra False Color (7‐2‐1) Image from 11/11/2006.14. You have now 4 MODIS images that can be viewed and compared within ArcMap as they are

referenced to a location in the world with their world‐file coordinates, one set (true and falsecolor‐) of images shows the area before flooding, the other set shows the area during theflooding.

15. Check out the 4 downloaded images (2 images of the flood (in true and false color) and 2 imagesof the non‐flood conditions, also in true and false color) This is so you can decide more easily inthe next step what a flooded area is and what is not a flooded area (or a lake)! You can togglethe checkbox for visibility to see what each layer is.

Page 5: Exercise 12 Mapping Floods in Boliviageode.colorado.edu/~geol3050/Exercises/Ex12-Bolivia-Floods.pdf · Exercise 12 Mapping Floods in Bolivia: Download MODIS satellite imagery, trace

5

C. Create a new shapefile for the flood data in ArcCatalog.

The goal now is to trace the extent of the flood. If we do that in a polygon format, we can then latercalculate the area of the flood.

Before we can trace the flood, we need to make a new file. In this case we will make a new shapefile.When you make a new shapefile, you will have to define the type (point, line or polygon) and theprojection you want to work in.

To trace the area of flooding, we will need a polygon feature type and not lines or points. To be ableto calculate the area in a unit that makes sense (not decimal degrees!), we want to work in squaremeters, and UTM would help us with that. In this case ZONE 20S on the southern hemisphere (don’tforget!). Use the WGS 84 datum, which matches the MODIS datum!

We will do our GIS File Management in ArcCatalog:(never mind the misnumbering here [we left off on step 15 above])

21. Open ArcCatalog.22. Browse to the directory, where your MODIS data is.23. Right click in the directory and select …. NEW > Shapefile 24. Fill out the Dialog Box as follows:

25. Open the file in ArcMap:• You can do this by dragging the file onto the Data Frame or Table of Contents (you will see a

tiny plus appear in your arrow).• You can ADD a Layer in ArcMap (the big plus button).

26. Note: Nothing will happen… there is nothing in the file yet! We have only defined the existenceof the file, but there are no features in it. You will see that the layer does show up in the Table ofContents, but not in the map.

It is important to note that the projection of the Data Frame is a geographic projection on WGS‐84 datum.

Page 6: Exercise 12 Mapping Floods in Boliviageode.colorado.edu/~geol3050/Exercises/Ex12-Bolivia-Floods.pdf · Exercise 12 Mapping Floods in Bolivia: Download MODIS satellite imagery, trace

6

This is to make sure that the MODIS Images plot correctly, just by using its world file. Also note that the flood data is in a projected coordinate system: UTM, Zone 20S, datum WGS 84. The coordinates of the UTM images are plotted by ArcMap on the fly to match the MODISdata!

D. Trace the flood extent (Edit the shapefile).Summary: First of all, you will need to examine the data and figure out what the area of interest exactly is. A box with the study area is given to you in the Exercise12A.zip file, placed on the server. Once you convince yourself what area is currently flooded, you can start tracing. The steps below outline your workflow:

27. Add Area of Interest.shp to ArcMap and also the Rio Grande shapefile.28. Make the fill Hollow or No color so you can see the satellite image below it and you can see the

outline of the study area plotted on top of the image.29. Zoom In to the study area (Area of Interest). It is best to make the flood shapefile the only one

selectable.30. Toggle (check and uncheck) between your 4 satellite images from November 2006 (2 image) and

February 2007 (2 images). Remember the following:

Water ranges from black to light blue in these images. Clear water is black, while sediment‐laden water is lighter in color. Clouds are pale blue, and plant‐covered land is green.

31. Take the false color 2/22/2007 image to trace over (so make sure the visibility of other images is turned off (unchecked)). You can double‐check with the 2007 TrueColor.

32. Open the Editor Toolbar via Customize > Toolbars > Editor:33. Under Editor choose Start Editing:

• An additional Editor Toolbar will open where ever you normally keep your Arc Toolbox. Choose the correct folder and file to edit (2007_Modis_flood)!

• Ignore the warning about the coordinate system... we know we are working with 2 different ones.

• Click on the 2007_Modis_flood file name in the Editor Toolbox and look below tothe “Construction Tools” box. There are several options of how to draw polygons.

34. Use the PolygonTool to create a new feature in the Target (the target is Shapefile2007_MODIS_flood).

It is important to set these settings right. You can explore and find different Pencil Tools for sophisticated drawing operations. There are also several different tasks like “Modify Feature” and many others, and you could by accident be editing the wrong file like “Area of Interest”. So be aware of these settings!

Page 7: Exercise 12 Mapping Floods in Boliviageode.colorado.edu/~geol3050/Exercises/Ex12-Bolivia-Floods.pdf · Exercise 12 Mapping Floods in Bolivia: Download MODIS satellite imagery, trace

7

35. Zoom In closely by dragging a box with the Zoom‐In tool:

36. Notice that you can see the pixels, once you are zoomed in that far.37. Try to digitize at a scale of 1:150,000 to make it convenient for you and capture enough detail.38. Left‐click around the light blue (water ‐ sediment loaded) and black areas (water ‐sediment free).

Also, check with the November 2006 false‐color image, if this is really a flooded area or – a pre‐ existing lake (there are a few of those in our study area)!

Editing Tips: • Make multiple polygons, for each distinct area one.• Once you are done with one polygon you can right click on your mouse and select FinishSketch, alternatively you can also double click to finish the polygon, or hit F2 on yourkeyboard.• F8 or right‐click menu can turn on/off streaming.• To modify vertex points, use the Edit Tool. Double click on the polygon and select your vertex point (the cursor will show a square and an arrow)… then you can move the point.

39. Make at least a dozen detailed polygons highlighting the largest flooded areas.40. Once you are done editing, Choose Editor > Stop Editing.41. You will be asked to save your Edits (say YES!!).

You can use Save Edits any time during the editing process from the Editor Toolbar. There is a saying: “Blink and Save”. ArcMap is known to crash… Saving the Map Document *.mxd, will not save the edits of your layer!!

Page 8: Exercise 12 Mapping Floods in Boliviageode.colorado.edu/~geol3050/Exercises/Ex12-Bolivia-Floods.pdf · Exercise 12 Mapping Floods in Bolivia: Download MODIS satellite imagery, trace

8

These are 2 different things: Saving the map (the combination of GIS layers, Layouts, Symbology, Queries) and saving the Edits (modifications within one Layer, only touches the shapefile itself, not the map document).

GIS Analysis: The previous steps (A‐D) were all done to gather our data from different sources (even hand‐digitized). Now we will start our real analysis: How big was the area flooded? How many people were affected?

E. Calculate the Area of the 2007 Flood

We will need to add a field to our newly digitized 2007_MODIS_Flood shapefile. Adding a field to a table (shapefile) and calculating a value for the different records is the same process that we used in the Geologic Map of Colorado Exercise (Exercise 7). Instead of calculating a text‐value, we will now calculate a number (i.e. Area):

42. Open the Attribute Table of the 2007_MODIS_Flood shapefile (make sure are not in “Edit‐Mode”anymore!!

43. In the upper left hand corner click on the Table Options drop down menu (the button looks like abulleted piece of paper), then

44. Choose Add Field and fill out the dialog as follows:• Name = Area• Type = Double• Precision = 15; (this sets the number of numbers that fit in thecolumn)• Scale = 2; (this sets the number of decimal points allowed)• **(See Appendix B for more explanation)

45. Go to the top of the new column Area.Click Calculate Geometry…

Ignore the error warning.

Page 9: Exercise 12 Mapping Floods in Boliviageode.colorado.edu/~geol3050/Exercises/Ex12-Bolivia-Floods.pdf · Exercise 12 Mapping Floods in Bolivia: Download MODIS satellite imagery, trace

9

46. Fill out the dialog box as follows:(Foreign aid‐agencies, like the Red‐Cross often measure in hectares.) 1 hectare is 100 x 100 meters.

47. Look at your Table, all records under Area should be filled out.48. Look at your Area …Field > Statistics.

Q1. Write down the SUM for the total area of land flooded, including units.

F. How many people are affected by this flood?

49. Download the Exercise12B.zip file and UNZIP it. It is a raster dataset containing somewhat generalized population information of Bolivia. The grid cells are ~900 meters. For each of the

Page 10: Exercise 12 Mapping Floods in Boliviageode.colorado.edu/~geol3050/Exercises/Ex12-Bolivia-Floods.pdf · Exercise 12 Mapping Floods in Bolivia: Download MODIS satellite imagery, trace

10

cells it contains an estimate of the population within the 900x900 meter square.

50. Add the unzipped raster to your project.• Use the Symbology of the Layer file for appropriate classification:• Via Layer Properties > Symbology (Classified) > Import, you can reset the current symbology

to the Bolivia_pop.lyr symbology, (You will have to use a “classified classification scheme)

How do you extract information from raster data?

It cannot be done via “Select by Location” that we have used before, which only works between vector data. As is common in GIS, there are several ways to get to our answer:

Method 1: “Zonal Statistics”

51. Make sure the Spatial Analyst extension is activated (Customize >Extensions).

52. Open ArcToolbox > Spatial Analyst Tools > Zonal.

Theoretically the tool works like this: you extract the raster data per area defined. In our case we want the values of the population raster that are overlapping with the mapped flood polygons. We are actually working with one zone: flooded area vs. NoData (not flooded area).

We only need a number, the Sum of the entire population that overlaps with the flooded polygons. A table will be sufficient:

53. Go to “Zonal Statistics as Table” (Arc Toolbox > Spatial Analyzt > Zonal > Zonal Statistics asTable).

54. Fill out the Dialog Box as follows:• Input raster or feature zone data: 2007_Modis_flood• Zone field: Id• Input value raster: Bolivia_pop• Output table: **browse to your folder and save the file with a name you willremember!• **Keep the Ignore NoData box checked

Result: only cells counted for each flooded region

Population Layer (Raster)

Flood Layer (Shapefile)

Page 11: Exercise 12 Mapping Floods in Boliviageode.colorado.edu/~geol3050/Exercises/Ex12-Bolivia-Floods.pdf · Exercise 12 Mapping Floods in Bolivia: Download MODIS satellite imagery, trace

11

• **Statistics type: can be left as default

55. Before choosing OK, we’ll need to set an Analysis Mask. An analysis mask will only give youresults with a certain area. In our case, only results within the study area, even if you havedigitized outside the box. It is an easy way to limit or subset our data:• On Geoprocessing label, go to Environments• Scroll down to Raster Analysis

o Set Cell size to: Maximum of Inputso Set Mask to: Area of Interest

56. Now choose OK and run the Zonal function.

57. This will add a table to our map document, with the number of the total population affected, inour study area. You can find the table in the Table of contents (think through which of the fieldshas the answer! Choose the List by Source tab (this looks like a 3D cylinder on a 2D square).) Thisreveals information of the physical location of the datasets in the Table of Contents. You cannotchange the order of the layers via the Source TAB. If you want to do that, go back to the “List byDrawing Order” Mode. Open the Table and find the correct number.

Page 12: Exercise 12 Mapping Floods in Boliviageode.colorado.edu/~geol3050/Exercises/Ex12-Bolivia-Floods.pdf · Exercise 12 Mapping Floods in Bolivia: Download MODIS satellite imagery, trace

12

Method 2: “Extract by Mask”

An alternative way to get the same result is to use the Spatial Analyst tools again, but now to “clip” our raster dataset to the extent of our flooded areas. This will return a grid that only has values below the flooded areas. From that grid, we can then calculate the total population:

Try this method too as it will teach you about the different approaches you can often take in GIS and double check that you get the same result:

58. Go to ArcToolbox > Spatial Analyst Tools > Extraction > Extract by Mask.59. Fill out as follows:

60. Again, go to Environments and set the Raster Analysis to match the Area of Interest, similar tostep 61. Run the tool.

61. You now have a new ESRI Grid, added to your Table of Contents. Also notice the extent of theGRID, it only has values in the flooded areas, and nothing outside it.

62. Open the Table of the GRID (Switch back to display mode in your table of contents):

63. Notice that you have 3 fields (RowID, Value and Count). How do you find the total populationaffected by the floods?

When you try the VALUE field > Statistics, what do you notice? Does this number come close to the number you got from the previous method?

The answer should be NO…

What are these fields? RowID = a unique identifier number, indicating each different VALUE. VALUE = number of population COUNT = how many times each population value occurs.

How can you extract the value we need from this information?

Page 13: Exercise 12 Mapping Floods in Boliviageode.colorado.edu/~geol3050/Exercises/Ex12-Bolivia-Floods.pdf · Exercise 12 Mapping Floods in Bolivia: Download MODIS satellite imagery, trace

13

When you multiply the value (total) population, by how many times that value occurs (we are only working with the flooded areas that we extracted from the total population), we can obtain a total population value for each “value”. When you then SUM that value via the statistics tool, you will find the total population in the flooded areas….

64. Add another field to the Table (via Options on the Lower Right of the table)65. Call it TotalPop (for total population). You can choose any numeric field (see appendix 2), the

default “short” works in this case as we are working with simple numbers, but make sure theprecision is at least 10.

66. Right Click on the TotalPop Field > Field Calculator and Calculate: VALUE * COUNTThis will come up with a total value for each RowID.

67. Right Click on the TotalPop Field > Statistics.Analyze the SUM of your statistics. This should be the same as in Method 1, via the zonal statistics. If there is a difference, make sure you have used the Analysis Mask in both methods.

Q2: Report the # of people affected by the flood from both methods. Do they agree? If not, provide a reason.

G. Make one Layout with two Data Frames

It is possible to have multiple data frames on the same piece of paper. Show one data frame with the interpreted flood data (your newly created shapefile) visible on the 721 false color MODIS image with the population data in transparency of February 22 2007 and the other data frame with the true color images of November 2006 for comparison.

68. Go to your Layout View.69. Set the File Menu > Page Setup to Landscape. Then right‐click in the data frame > Distribute >

Fit to Margins70. Check Scale Map Elements Proportionally to Changes in Page Size. This will just make things

slightly easier as you will have to move around less. Click OK.71. Clip the data frame with the Area of Interest.shp file

(Go to Data Frame Properties > Data Frame > Clip to Shape > click on Specify shape > check Outline of features > select Area of Interest in the layer field)

72. In the same Data Frame Properties > Data Frame > set the scale fixed to 1:600,00073. Make the Data Frame > Frame Border > None74. Go to Menu> Insert > New Data Frame, and scale your new data frame to match the Layout.

Page 14: Exercise 12 Mapping Floods in Boliviageode.colorado.edu/~geol3050/Exercises/Ex12-Bolivia-Floods.pdf · Exercise 12 Mapping Floods in Bolivia: Download MODIS satellite imagery, trace

14

75. Now we need to add data to the new data frame: we just want to show the 2006 true colorMODIS image, as it shows the normal non‐flooded state:

• Hit the plus button to Add the 2006 jpeg• Or... Go to your Layers Data frame, Copy Layer (right‐click), and paste the Layer in the New

Data Frame.• Repeat the step for the Area of Interest.shp file.• Move new data frame adjacent to original data frame

76. You can now rename the data frames for your own clarity. One you can call MODIS Frame,theother one you can call Mapped Flood Frame (Renaming works the same as renaming a LayerName in the Table of Contents).

77. Note that you can see which Data Frame is active by a dashed outline around it. Also the ActiveData frame is BOLD in the Table of Contents!

78. Set the Projection Information of the MODIS Data Frame to the same projection as the firstframe (you can always look at the Data frame Properties, or go back to step24).

79. To make the extent and look of the MODIS Data Frame the same as the Mapped Flood one,repeat steps 71‐73.

80. Finish your Layout with: Title, Grid, Scale bar (just one is enough, as both data frames are set toa fixed scale and should be the same!!), North Arrow, Legend (on the upper corner of themaps), Text annotation describing how many people were affected by the flood and total areaflooded and all other parts of a complete layout.

81. Mark clearly what images you are showing and what date they are from! … text.

82. Mention the projection (see number 24 if you forgot, and check your data frame) .... text.

83. Play with the transparency of your flooded area, or make it hollow. Also include the RioGrandepolygon extent on one of your maps to show the extent of flooding.

84. Play with the transparency of your population data.

Page 15: Exercise 12 Mapping Floods in Boliviageode.colorado.edu/~geol3050/Exercises/Ex12-Bolivia-Floods.pdf · Exercise 12 Mapping Floods in Bolivia: Download MODIS satellite imagery, trace

15

85. Finalize your Layout, make sure your name is on it!

H. Generate Metadata for the 2007_MODIS_flood file (15 minutes)

It is good practice when you create a new file, to update the Metadata for it, the data about the data: who created it, when, what for, who is the contact person. This file‐management task is again done in ArcCatalog.

86. Go to ArcCatalog.

87. Browse to the 2007_MODIS_flood file in ArcCatalog

88. Right Click and go to the Description TAB, (which contains the Metadata) notice that nothing hasbeen filled out.

89. Click on the Edit button that is located just under the threetabs.

90. Start Editing the Metadata:• Choose a title and tags• Feel free to include an image• Choose the correct place to mention the original FAS_BOLIVIA MODIS dataset• Also include the location where you downloaded it• Don’t forget your name and contact information.

Page 16: Exercise 12 Mapping Floods in Boliviageode.colorado.edu/~geol3050/Exercises/Ex12-Bolivia-Floods.pdf · Exercise 12 Mapping Floods in Bolivia: Download MODIS satellite imagery, trace

16

K. What you need to hand in!

• The answers to your questions (Q1 and Q2). 1 exported Layout containing 2 data frames: the resultsfrom step H.

• Upload your shapefiles to Canvas as a separate file from your lab write‐up. Please "zip" these files foruploading to Canvas. Make sure you add all 7 files when zipping them! (including: .*shp, *.shx, *.sbn,

*.dbf, *.sbx, *.prj, *.shp.xml (i.e. the metadata you added too!). Close ArcGIS before zipping the files!

Page 17: Exercise 12 Mapping Floods in Boliviageode.colorado.edu/~geol3050/Exercises/Ex12-Bolivia-Floods.pdf · Exercise 12 Mapping Floods in Bolivia: Download MODIS satellite imagery, trace

17

Appendix A. World file contents Images are stored as raster data, where each cell in the image has a row and column number. Shapefiles and coverages are stored in real‐world coordinates. In order to display images with coverages or shapefiles, it is necessary to establish an image‐to‐world transformation that converts the image coordinates to real‐world coordinates. This transformation information is typically stored with the image. Some image formats, such as ERDAS, IMAGINE, BSQ, BIL, BIP, GeoTIFF, and grids, store the georeferencing information in the header of the image file. ArcView uses this information if it is present. However, other image formats store this information in a separate ASCII file. This file is generally referred to as the world file, since it contains the real‐world transformation information used by the image. World files can be created with any editor.

World file naming conventions It's easy to identify the world file which should accompany an image file: world files use the same name as the image, with a "w" appended. For example, the world file for the image file mytown.tif would be called mytown.tifw and the world file for redlands.rlc would be redlands.rlcw. For workspaces that must adhere to the 8.3 naming convention, the first and third characters of the image file’s suffix and a final "w" are used for the world file suffix. Therefore, if mytown.tif were in a an 8.3 format workspace, the world file would be mytown.tfw. If redlands.rlc was in an 8.3 format workspace, its world file would be redlands.rcw. For images that lack an extension, or have an extension that is shorter than three characters, the "w" is added to the end of the file name without altering it. Therefore the world file for the image file terrain would be terrainw; the world file for the image file floorpln.rs would be floorpln.rsw.

The contents of the world file will look something like this:

20.17541308822119 0.00000000000000 0.00000000000000 ‐20.17541308822119 424178.11472601280548 4313415.90726399607956

When this file is present, ArcMap performs the image‐to‐world transformation. The image‐to‐world transformation is a six‐parameter affine transformation in the form of:

x1 = Ax + By + C y1 = Dx + Ey + F

where:

x1 = calculated x‐coordinate of the pixel on the map y1 = calculated y‐coordinate of the pixel on the map x = column number of a pixel in the image y = row number of a pixel in the image A = x‐scale; dimension of a pixel in map units in x direction B, D = rotation terms C, F = translation terms; x,y map coordinates of the center of the upper‐left pixel E = negative of y‐scale; dimension of a pixel in map units in y direction

NOTE: The y‐scale (E) is negative because the origins of an image and a geographic coordinate system are different. The origin of an image is located in the upper‐left corner, whereas the origin of the map coordinate

Page 18: Exercise 12 Mapping Floods in Boliviageode.colorado.edu/~geol3050/Exercises/Ex12-Bolivia-Floods.pdf · Exercise 12 Mapping Floods in Bolivia: Download MODIS satellite imagery, trace

18

system is located in the lower‐left corner. Row values in the image increase from the origin downward, while y‐coordinate values in the map increase from the origin upward. The transformation parameters are stored in the world file in this order:

20.17541308822119 ‐ A 0.00000000000000 ‐ D

0.00000000000000 ‐ B ‐20.17541308822119 ‐ E 424178.11472601280548 ‐ C 4313415.90726399607956 ‐ F

Page 19: Exercise 12 Mapping Floods in Boliviageode.colorado.edu/~geol3050/Exercises/Ex12-Bolivia-Floods.pdf · Exercise 12 Mapping Floods in Bolivia: Download MODIS satellite imagery, trace

19

Appendix B. ArcGIS data types

When creating tables, you will need to select a data type for each field in your table. The available types include a variety of number types, text, date, binary large objects (BLOBs), or globally unique identifiers (GUIDs). Choosing the correct data type allows you to correctly store the data and will facilitate your analysis, data management, and business needs.

Numeric data types Numeric fields can be stored as one of four numeric data types: short integers; long integers; single‐precision floating point numbers, often referred to as floats; and double‐precision floating point numbers, commonly called doubles. Each of these numeric data types varies in the size and method of storing a numeric value. In numeric data storage, it is important to understand the difference between decimal and binary numbers. The majority of people are accustomed to decimal numbers, which are a series of digits between zero and nine with negative or positive values and the possible placement of a decimal point. On the other hand, computers store numbers as binary numbers. A binary number is simply a series of 0s and 1s. In the different numeric data types, these 0s and 1s represent different coded values, including the positive or negative nature of the number, the actual digits involved, and the placement of a decimal point. Understanding this type of number storage will help you make the correct decision in choosing numeric data types. In choosing the numeric data type, there are two things to consider. First, it is always best to use the smallest byte size data type needed. This will not only minimize the amount of storage required for your geodatabase but will also improve the performance. You should also consider the need for exact numbers versus approximate numbers. For example, if you need to express a fractional number, and seven significant digits will suffice, use a float. However, if the number must be more precise, choose a double. If the field values will not include fractional numbers, choose either a short or long integer.

Integers The most basic numeric data type is the short integer. This type of numeric value is stored as a series of 16 0s or 1s, commonly referred to as 16 bits. Eight bits are referred to as a byte; thus, a short integer takes up two bytes of data. One bit states if the number is positive or negative and the remaining 15 translate to a numeric value with five significant digits. The actual numeric value for a short integer is approximately between ‐ 32,000 and +32,000. A long integer is a four‐byte number. Again, one bit stores the positive or negative nature of the number while the remaining bits translate to a numeric value with 10 significant digits. The actual range for a long integer is approximately between ‐2 billion and +2 billion. Both short and long integers can store only real numbers. In other words, you cannot have fractions or numbers to the right of the decimal place. To store data with decimal values, you will need to use either a float or a double.

Floats Floats and doubles are both binary number types that store the positive or negative nature of the number, a series of significant digits, and a coded value to define the placement of a decimal point. This is referred to as the exponent value. Floats and doubles are coded in a format similar to scientific notation. For example, if you wanted to represent the number ‐3,125 in scientific notation, you would say ‐3.125x103 or ‐3.125E3. The binary code would break this number apart and assign one bit to state that it is a negative number; another series of bits would define the significant digits 3125; another bit would indicate whether the exponent value is positive or negative; and the final series of bits would define the exponent value of 3. A float is a four‐bit number and can store up to seven significant digits, producing an approximate range of values between ‐ 3.4E‐38 to ‐1.2E38 for negative numbers and from 3.4E‐38 to 1.2E38 for positive numbers. A double is an eight‐byte number and can store up to 15 significant digits, producing an approximate range of values between ‐2.2E‐308 and ‐1.8E308 for negative numbers and 2.2E‐308 and 1.8E308 for positive numbers. It is important to note, however, that floats and doubles are approximate numbers. This is due to two factors. First, the number of significant digits is a limiting factor. For example, you could not express the number 1,234,567.8 as a float because this number contains more than the permissible seven digits. To store the

Page 20: Exercise 12 Mapping Floods in Boliviageode.colorado.edu/~geol3050/Exercises/Ex12-Bolivia-Floods.pdf · Exercise 12 Mapping Floods in Bolivia: Download MODIS satellite imagery, trace

20

number as a float, it will be rounded to 1,234,568, a number containing the permissible seven digits. This number could easily be expressed as a double, since it contains less than the permissible 15 significant digits. There are also some limitations to numbers a binary value can represent. One analogy that can be made would be in expressing fractions versus decimals. The fraction 1/3 represents a particular value. However, if you try to express this number as a decimal, the number will need to be rounded at some point. It could be expressed as 0.3333333, however, this is still an approximation of the actual value. Just as fractions cannot always be expressed as decimals, some numbers cannot be exactly expressed in binary code, and these numbers are replaced by approximate values. One example of such a number is 0.1. This number cannot be expressed as a binary number. However, the number 0.099999 can be expressed in binary. Thus, 0.1 would be replaced with an approximate value of 0.099999.

Field precision and scale The precision and scale of a field describe the maximum size and precision of data that can be stored in the field. The precision describes the number of digits that can be stored in the field and the scale describes the number of decimal places for float and double fields. When creating a new field in a geodatabase feature class or table, you can specify the field's type, precision, and scale. When the field is actually created in the database, the field type may be changed based on the precision and scale values you specify. Use the following guidelines for choosing the correct field type for a given precision and scale:

When you create a float, double, or integer field and specify 0 for precision and scale, the geodatabase will attempt to create a binary type field if the underlying database supports it. Personal geodatabases support only binary type fields, and precision and scale are ignored.

When you create float and double fields and specify a precision and scale, if your precision is greater than 6, use a double; otherwise, use a float. If you create a double field and specify a precision of 6 or less, a float field is created in the database. If you create a float field and specify a precision greater than 6, a double field is created.

If you specify a scale of 0 and a precision of 10 or less, you should be creating integer fields. When creating integer fields, your precision should be 10 or less, or your field may be created as double.