26 points Due: Monday, April 23, 11:59 pm GPH 370 Module 9: Introduction to GIS Analysis and Raster Data Instructions for using Quantum GIS 1.7 (Wroclaw), in the school labs or on your own computer Goals In this module, you’ll Work with raster data (as contrasted with vector data, in Module 8) Carry out a simple GIS analysis Think about how the analysis you did could be improved upon Deliverables For this module, upload everything to Blackboard: Responses to all questions shown with blanks (13 points) 3 screen prints (3 pts ea, 9 points total) Paragraph suggesting improvements to the analysis – explained in step 36 (4 points) Get the GIS data files you’ll need This exercise will use 4 GIS data layers, which consist of a total of 19 files. As with Module 8, you’ll need to work with your own copies of the files. As before, you’ll need to download a Zip file from Blackboard and place the 19 files in your own folder. Here’s a review: 1. On your flash drive or your computer, create a folder , “MyModule9”. (In GIS work, avoid using spaces in file or folder names.) 2. From the Module 9 listing under “Modules” on Blackboard, save the file Module9.zip. 3. Open the zip file, copy all the files within it, and paste them into the folder you created. The 19 files in your folder will be: Files for the two vector layers: 2010_SantaCruz_blockLevel.dbf 2010_SantaCruz_blockLevel.prj 2010_SantaCruz_blockLevel.sbn 2010_SantaCruz_blockLevel.sbx 2010_SantaCruz_blockLevel.shp 2010_SantaCruz_blockLevel.shp.xml 2010_SantaCruz_blockLevel.shx Files for the two raster layers: a. SantaCruz_el.aux b. SantaCruz_el.tif Santacruz_roads.dbf Santacruz_roads.prj Santacruz_roads.sbn Santacruz_roads.sbx Santacruz_roads.shp Santacruz_roads.shp.xml Santacruz_roads.shx c. SantaCruz_pop.aux d. SantaCruz_pop.rrd e. SantaCruz_pop.tif 1 The Exercise: Some Vector and Raster Analyses PART I: Loading the software and adding 2 plugins Load Quantum GIS, as you did for Module 8. Quantum GIS has “plugins” that add to its functionality. For this exercise, you’ll want to add some plugins that help with analysis. 1. From the top menu bar, go to Plugins > Manage Plugins 2. The list that appears is organized alphabetically. Find the Raster Terrain Analysis Plugin, and the Spatial Query Plugin, and if they’recheck the box to the left of each one, if they’re not already checked. Click OK to close the window. 3. The Plugins will be available now as items on the main Plugins menu: In the next 2 sections, you’ll do some GIS analysis, using data layers for Santa Cruz County in Southern Arizona. PART II: Spatial and Combination Queries with Vector layers 1. Using the “ ” menu item or button, add your copies of the two vector layers, 2010_SantaCruz_BlockLevel.shp (Census blocks, with 2010 population totals) santacruz_roads.shp (Major roads of Santa Cruz County) 2. They’re in the same coordinate system, so they will overlay with no extra effort. If the roads don’t show up, check the Layers list on the left side, and move the BlockLevel layer below the roads layer by setting your cursor on the layer name and dragging down. 3. Now you’ll set up a spatial query, asking “Which census blocks have major roads running through them?” Or, stated in GIS terms, “Which census blocks intersect roads?” To carry out this query, a. Choose Plugins > Spatial Query > Spatial Query. b. The menu shown on the right will appear. c. From the 3 dropdown lists, make the selections illustrated at right, and click “Apply.” d. The progress bar will show you the process of the query, and then a list of blocks will appear, and the blocks that intersect roads will appear in yellow on the map. e. Click the “Close” button of the Spatial Query window ( ), and take a look at the highlighted blocks on the map. 2 4. In the next steps, you’ll execute a type of combination query, asking “Which census blocks intersect roads, and have populations over 200 people?” a. Open the attribute table of the Blocks layer, by right-clicking on its name and choosing Open attribute table. b. You’ll notice that the census blocks you selected in the spatial query are highlighted. c. At the bottom of the table, you’ll see . Check this box. d. Now you’ll select, from the blocks that intersect roads, the ones that have populations > 200. As practice in working with the logic of queries, fill in the blank below with the correct Boolean Operator for what you’re about to do: Select blocks that intersect roads __________ (AND, OR, NOT) have populations > 200. e. To carry out the combination query, click the Advanced Search button. You’ve used this before—think about what you did last time, and type in an SQL query to select all blocks that have populations > 200. Click OK to close the Advanced Search dialog. f. Look at the top of the Attribute table. You’ll see a statement like “(403 matching features).” This is the number of census blocks that meet both of the criteria of the combination query. How many matching features are there? _______________ g. Close the attribute table. Make a screen print of the map, showing the blocks that both intersect roads and have populations greater than 200. Either paste the image into a Word document, to upload to Blackboard, or save the image to upload directly. h. Now re-open the attribute table, and de-select all census blocks. To do this, click on the leftmost button below the attribute table (circled at right). 5. Next you’ll do some quick combination queries based just on attributes of the Blocks layer. Reopen the Advanced Search window, and enter each of the following queries in the SQL block. For each, look at the top of the attribute table to find out how many census blocks meet the SQL criteria: a. TOTALPOP > 100 AND LAND_sqmi > 1 __________ b. TOTALPOP > 100 OR LAND_sqmi > 1 __________ c. TOTALPOP > 100 AND NOT LAND_sqmi > 1 __________ 3 PART III: A SIMPLE GIS ANALYSIS USING RASTER DATA In this section, you’ll do a simple multi-part GIS analysis. The purpose of the analysis is to find areas in Santa Cruz County that could be suitable sites for a hazardous waste landfill, based on 2 criteria: The location should have no people living nearby The location should have a slope of less than 10 degrees (to minimize the risk of landslides). A. Add an elevation layer, and calculate slopes for the county area 6. Start with a new project file: File > New Project 7. Using Layer > or its button, add the layer SantaCruz_el.tif. Wait a few moments for the layer to appear. SantaCruz_el is a “Digital Elevation Model” for Santa Cruz County. It shows the varying elevations of the county as rows of pixels, each pixel representing an area 30 m square. However, initially you’ll see the layer as a black rectangle. To make the variations in elevation visible, you’ll adjust the way the layer is symbolized: 8. On the Layers list on the left side of the screen, right-click on SantaCruz_el and choose “Properties”. If the Symbology options aren’t already showing, click on Symbology. This is what you should see: 9. On the bottom right, change the Contrast Enhancement setting to “Stretch to MinMax”, and click OK. 10. Now you’ll see an image with light and dark areas, and the area outside of the county will be black. The lightest areas have the highest elevations. 11. Use View > Identify features -- or the button for this tool (see right) -- to get an approximate idea of the range of elevations in the county. Select the tool, and click in the lightest area of the image. You’ll see a simple list of attributes. Unlike the vector layers, there’s really only one attribute, labeled as Band 1. The number gives the pixel’s estimated elevation, in meters. Leaving the results list open, click in a few areas to get a sense for the highest elevation. What is the approximate highest elevation of Santa Cruz County? ____________ 12. Now click in the darkest area (within the county, not outside). What is the approximate lowest elevation in the county? ___________ 4 13. Most GIS products are able to use an elevation layer like this one to create a map of how the steepness of slopes varies. We can use this to find areas in Santa Cruz County with slopes less than 10 degrees. To do this, choose Plugins > Raster-based Terrain Analysis > Raster-based Terrain Analysis. 14. With the dialog shown at right, you’ll create a new GIS layer that will show variations in slope. a. For the first option, Analysis, choose “Slope”. b. For Output layer, click on the browse button, and navigate to your MyModule9 folder. Give the new layer the name santacruz_slope. Browse c. Click OK. You should see a progress bar as the layer is created. You’ll see a progress bar; wait until it reaches 100% and then disappears. 15. To see the new slope layer, use Add Raster Layer, navigate to where you saved the file, and add it to the project. 16. Initially it will appear as a grey rectangle. Here’s an alternate way to see the layer’s variation: right-click on the layer name, and choose . 17. The steeper slope, the lighter it will appear on the map. Zoom in to a light area, using the tool circled at right. Then use the “Identify” tool to find the slope of a relatively steep (light) area. (The slope will again be indicated by the attribute called Band 1.) The number gives the slope as an angle, so “0” would be flat, and “90” would be a vertical cliff. 18. Slope of a relatively steep area ___________. 19. In order to see the whole layer again, right-click on “santacruz_slope” on the left side, and choose Zoom to layer extent. B. Classification: Create a new layer that identifies slopes less than 10 degrees For the purpose of identifying possible locations for a hazardous waste site, the key question about elevation is where in the county there are slopes less than 10 degrees. So you’ll create a new layer that makes it very easy to identify the areas with suitable slope. 20. Choose Raster > Raster Calculator 5 21. You’ll see the window shown below. a. Click on the “Browse” button, navigate to your MyModule9 folder, and name your file santacruz_flatareas. b. From the “Raster bands” list in the upper left, double-click on santacruz_slope@1, so it appears in the “Raster calculator expression” box. c. Then use your computer keyboard to type “<10”. (The < sign doesn’t appear as a button.) Your expression should look like at right. d. Check the box for “Add result to project.” e. Click OK. step 21b step 21a: Browse step 21d step 21c: Type “<10” step 21e 22. As before, initially you won’t see any variation in the data. Use either of the two methods you’ve learned (Steps 8-9 or step 16) to enhance the image’s contrast. You’ll see only black and white, no grey. 6 23. Using the “Identify” tool ( ), click in the white and black areas, and list their values here: White ______ Black _______. This classification step has reduced the slope data to two categories: a. “1” for areas with slopes less than 10 degrees (desirable for hazardous waste site) b. “0” for areas with slopes greater than 10 degrees C. Add the Santa Cruz population layer, and identify areas with no population. 24. Using Layer > Add Raster Layer or its button, add the layer SantaCruz_pop.tif. 25. Use one of the methods you’ve learned to enhance the image’s contrast. 26. This is a raster version of the Census Block vector layer you used in Part I. The white polygon is the census block with the highest population, and the completely black areas are census blocks that have no population. Make your second screen print at this stage, and either paste it into your Microsoft Word document, or save it to upload directly to Blackboard. 27. Similar to what you did with the Elevation layer, you’ll create a new layer that clearly distinguishes areas with no population – areas that may be possible sites for the hazardous waste dump. 28. Once again, bring up the Raster Calculator. Review what you did in step 21, and repeat, with 2 differences: a. Name your new file santacruz_nopop b. Think about your Raster Calculator expression. Remember, you want to select areas with a population of “0”. 29. Once the layer appears, enhance its contrast so you can see the variation in the data – using the same technique as you did for the other 2 raster layers you’ve created. 30. Using the Identify tool ( ), click on the white and black areas, and compare with what the layer SantaCruz_pop shows. On santacruz_nopop, a. Which color represents “no population”? ________ b. What “Band1” value (0 or 1) represents “no population”? _________ 7 D. Do an overlay analysis to identify areas that meet both criteria for a hazardous waste site. This is the last step of this analysis. You’ll use santacruz_flatareas and santacruz_nopop to create a new layer. The new layer will show 3 categories of land: areas that meet both criteria for a hazardous waste site, areas that meet one or the other criteria, and areas that meet neither criteria. 31. Bring up the Raster Calculator. For this step, a. Name your new file possible_sites b. The Raster Calculator expression will be: 32. When the new layer appears, enhance its contrast, as you’ve done before. You should see white, grey & black areas. 33. The overlay calculation was addition. No population areas had a value of “1” and flat areas had a value of “1” – so areas that meet both criteria will have a value of “2” in your new layer. 34. What do you think grey areas (with a value of “1”) represent? ________________________ 35. Make your 3rd screen print, showing this final map, and either paste it into your Microsoft Word document, or save it to upload directly to Blackboard. E. Think about the analysis and how it could be improved (4 points) 36. As the last step of this project, think a little about the analysis you just did. If in the real world, you were going to use GIS to find possible locations for a hazardous waste site, how would you improve on this practice exercise? How could you improve the definition of “unpopulated” or “flat” areas? What other variables would you consider? Write a short paragraph mentioning at least 2 ways that you could improve this analysis. (4 points) Thanks for your work this semester! To keep exploring GIS, you can download the QGIS manual – just go to http://qgis.org and choose Documentation. 8