Geography 387 Lab Home | Geography 387 Home | Geography Home

Lab 9: Raster Spatial Analysis


Outline

  1. Purpose
  2. Introduction
  3. Add and display data
  4. Analyze layers using raster calculator
  5. Buffer and select cities
  6. Summarize attribute table
  7. Final analysis
  8. Conclusion
  9. To turn in

1.0 Purpose

In this laboratory exercise we will examine a spatial analysis problem and develop a GIS solution using the raster analytical capabilities of ArcGIS.

2.0 Introduction

The Scenario

You have been hired in your first job as a GIS consultant. An executive from an energy supplier has presented you with an interesting problem. Her company would like to expand into the solar power market, but the company is not sure of which global regions to focus its efforts. The executive also hopes to introduce her company to GIS technology and its potential uses. She has been asked to present her boss with a ranking of regions worldwide based on their potential for solar power generation. The executive has asked you to provide her with information to help her make her rankings of potential new markets for solar power.

Basic Information

This work will involve some map overlay analysis. You will construct a query with ArcMap's Raster Calculator. This is a very powerful and versatile tool, but for the purposes of your work, we are going to keep the analysis relatively simple.

All of the data for this contract will be provided to you (although this is rarely the case in real-world consulting jobs). Each of the data layers used in this exercise were downloaded, re-projected to GCS and converted to the ESRI's GRID raster format. Data sources are given below.

The layers used are those thought to relate to mapping the potential supply and demand for solar-generated power. On the supply side, layers include maps of estimated incoming solar radiation, the expected average cloud cover, and global terrain. On the demand side, a global population layer is provided to buffer the solution set and limit it to those areas located close to major global population centers.

Your client has decided that solar power production should be a) close to populated areas, b) in low elevation areas, c) in relatively sunny areas, and d) near the equator so that solar intensity will be strong enough to efficiently produce electricity.

Data Sources

Insolation data source: Derived from a figure in Geosystems (Robert Christopherson)
Units: Watts per square meter

Popden data source: NCGIA
Units: persons per square kilometer
More information: http://www.ciesin.org/datasets/gpw/globldem.doc.html

Elevation data source: Data set GTOPO30, United States Geological Survey, EROS Data Center
Units: meters
More information: http://edcdaac.usgs.gov/gtopo30/gtopo30.html

Clouds data source: UNEP GRID
Units: percent cloudless, defined as the actual number of bright sunshine hours over the potential number. This means that a pixel with a lot of sunny days has a relatively HIGH percentage.
More information: http://gcmd.nasa.gov

3.0 Add and display data

To begin, download the datasets from the lab9.zip archive and extract the files to your Lab 9 directory. Next, open ArcMap, and add the 4 raster layers provided: clouds, elevation, insolation and popdense.

Now we will change the symbology on each of the four raster layers so that they have reasonable display properties.

Open the Properties -> Symbology window for the insolation layer. Choose "Classified" in the Show column and change to a ramped color scheme (e.g., shades of red) instead of random colors.

Now change the display for the elevation layer. Change from "Stretched" classification to "Classified" classification. Change the number of class breaks to 10, but leave the classification scheme on Natural Breaks (the default). Select an appropriate color scheme for elevation. The Symbology window should look like the one below.

Elevation symbology

Next, change your clouds layer to show as "Classified" and set it to an appropriate color ramp (e.g., shades of blue). Go ahead and leave your popdense layer as the default gray-scale colors, or change its symbology to a different color scheme if desired.


Now that the symbology for each of the layers has been modified, remember to save your map document. Click on the minus sign to the left of the layer names to hide the classification schemes in the TOC. This will help keep your TOC organized and easy to navigate through.

Minimize symbology in TOC

4.0 Analyze layers using raster calculator

Confirm that the Spatial Analyst toolbar is present at the top of the ArcMap window. If it is not, go to View -> Toolbars and select it from the list, then go to Tools -> Extensions and make sure Spatial Analyst is checked on in the extensions list.

Spatial Analyst toolbar

On the Spatial Analyst toolbar, click on the Spatial Analyst button and choose Raster Calculator from the menu. The Raster Calculator window will open (see image below).

Raster calculator

First we will create a new raster layer to demonstrate how the Raster Calculator works.

In the layers listing in the Raster Calculator window, double-click on popdense, then click on the ">" (i.e., greater than) button to the right. Next, type in 50 in the text box after the > sign. Now evaluate the expression by clicking Evaluate.

Raster calculation example

The tool should create a temporary raster layer (Calculation) in ArcMap showing all of the areas with a population density greater than 50 (persons per square kilometer). In this raster layer, a cell value of 0 indicates a cell where the population density is less than 50 (the expression was False), and a value of 1 indicates that the population density for the cell is greater than 50 (expression was True). The 0, 1 format is referred to as a "binary map"--based on the query expression, every raster cell is either True or False.

Note: Calculation is just a TEMPORARY raster layer and will DISAPPEAR if you were to close your ArcMap session and return to it later. If you would like to make Calculation a permanent raster layer (i.e., save it in your data folder for this lab), you will need to right-click on the layer and select Make Permanent. If you store the raster in a GRID format then the file name can not be more than 13 characters long. The Erdas Imagine (.img) raster format does not have this name-length restriction. It is always a good idea to avoid spaces in your file names when working in ArcGIS.

AGAIN: Ouput rasters are TEMPORARY. Be sure to Make Permanent your raster outputs if you expect to use them again -- like when you come back to use them in the next lab session. If you don't make the raster layers permanent, then they will not be saved in your working directory.

Now that is clear, let's use the Boolean function AND ("&") to write and evaluate queries that create the following new rasters:

Raster 1

  1. Population Density is greater than 50 persons per square kilometer
  2. Insolation is greater than 200 Watts per square meter
  3. Elevation is less than 1524 meters (5000 feet)
  4. Cloudless hours is greater than 60% cloud-free hours per year

Raster 1 calculation

Raster 2

  1. Population Density is greater than 50 persons per square kilometer
  2. Insolation is greater than 200 Watts per square meter
  3. Elevation is less than 1524 meters (5000 feet)
  4. Cloudless hours is greater than 70% cloud-free hours per year

Raster 3

  1. Population Density is greater than 50 persons per square kilometer
  2. Insolation is greater than 200 Watts per square meter
  3. Elevation is less than 1524 meters (5000 feet)
  4. Cloudless hours is greater than 75% cloud-free hours per year

If you have problems, the help file on "About Building Expressions" button will be useful. You can read more about the Raster Calculator in the help Contents tab, under Extensions->Spatial Analyst->The Raster Calculator.

Give your output rasters useful names, such as cloud60, cloud70, and cloud75.

Question 1 :

Which of these 4 factors do you think is most important in determining potential solar power generation rates? Why?

 

Question 2 :

Which of the 3 raster outputs (cloud60, cloud70, or cloud75) do you think is the most appropriate for use in our analysis? Why?

 

Map 1
Make a map your 3 raster outputs. The map should have three panels, each with a different a raster output. Rename the layers and labels (e.g., 0, 1) to something meaningful, so that the company understands your map. You can change the name of the raster layer and labels by left-clicking twice on the names in the TOC. Make the colors of the 3 rasters the same for easy comparison. True values (1s) should be a solid color, while False values (0s) should have no color. Change colors by right-clicking the color tab in the TOC. You can use the included country boundary shapefile in your map as a reference background layer. Remember to add: a map title, your name, legend, scale bar, north arrow, neat line, etc. Be sure to label the panels so that the client knows which panel belongs to each model output. Use colors for the raster cells that are bright and obvious, and make the countries very light (e.g., hollow and a light gray, thin border works well). Export the map to a PDF file with 150 dpi.

5.0 Buffer and select cities

Now that you have raster layers with the potential areas for solar power generation, you also need to figure out which major cities could potentially benefit from solar power. Using buffers, we will determine which major cities are within 50 miles of potential power generation regions. As you learned in Lab 8, buffering calculates distances from vector features and then produces polygons that represent the area surrounding the features out to that distance.

Begin by adding the world cities shapefile (cities.shp) to the ArcMap TOC. Use Select by Attributes from the Selection menu to find all of the cities with population greater than 1 million people. Export this selection into a new shapefile using Data -> Export Data. Call the exported layer cities_selection.shp or a similar, descriptive name. Add this new layer to your map document. Before moving on from here, choose Clear Selected Features from the Selection menu. This will clear the selected cities.

Cities selection

Now create a 50-mile buffer around the cities_selection shapefile. Refer back to Lab 8 if you forget how to do this vector spatial analysis. Make sure that your units are correct when filling in the distance setting! Also, leave the Dissolve Type as None. Save the buffers to a new shapefile with an appropriate name (e.g., cities_selection_Buffer.shp).

Next you will need to find out which of these buffers intersect with the solar power production regions. Before doing the intersection, however, you must decide which of the power region rasters to use in your analysis. Based on your answer for Question 2 above, decide which of the output rasters (cloud60, cloud70, or cloud75) you should use for your project.

The fact that potential power regions are cells in a raster layer and cities are points in a vector layer causes a complication in your analysis, since these are different data models. To remedy this problem, you need to convert the raster layer to a vector layer. To do this use the Spatial Analyst -> Convert -> Raster to Features tool to convert your chosen "cloudxx" raster layer into a polygon vector layer. Be sure to set the output path to your working directory. Do not generalize the lines of your new vector layer. Name the output shapefile solar_vector.shp. Note: this is the same process as using the Raster to Polygon tool in ArcTools; it's just a different interface and easier to find in the Spatial Analyst toolbar.

Raster to vector conversion

Classify the symbology on the solar_vector layer to show the areas of potential use (GRIDCODE = 1).

Now that the datasets are both vector layers, we can use the Selection -> Select By Location tool to determine which buffers fall within the potential solar power locations. First, however, since you want to find which buffers intersect with areas of potential use only, you must make sure that these potential area polygons are selected beforehand (ie., solar_vector layer, GRIDCODE is 1). Use Select by Attributes to select the polygons in solar_vector that have a value of GRIDCODE = 1. Next, use Select by Location to select the buffers that intersect your selected solar_vector polygons . Your final Select by Location window should look similar to the one below.

Select by Location

You will now have city buffers selected that intersect the ideal solar power generation areas. Go ahead and clear the selected solar_vector polygons, by right-clicking on solar_vector and clicking Selection -> Clear Selected Features.

Now determine which cities fall within the selected city buffers. You are on your own for this part (hint: you need another Select by Location operation). Be sure to save your selected cities as a separate shapefile. When completely finished, clear your selected buffer features with Selection -> Clear Selected Features.

At the end of this step, you will have a point layer consisting of all cities of more than one million people that are within 50 miles of a region meeting your criteria for solar power production.

6.0 Summarize attribute table

If you open the attribute table of your selected cities, you can create summary statistics to learn more about the results.

Open the attribute table for your selected cities point shapefile (last step from Section 5). Make the field Country active in your table. Right-click on the field header and select Summarize. Select Population -> Sum as the summary statistics to be included in the output table. Specify the location and name for your output table. Click OK. Go ahead and add the table to your TOC when prompted.

Summarize cities

Now open the summary table from the TOC and examine the results. The "Count_COUNTRY" column shows the total number of cities in the given country that meet your criteria. If you wish to sort any column for easier reviewing, right-click on its heading and choose Sort Ascending or Sort Descending.

Turn your output table in with your lab files.

7.0 Final analysis

Question 3 :

In which country would you advise the company is a good location for investment in solar power generation? Which is the most important city in that country? Explain your reasons for both answers.

 

Map 2
Make a map showing ALL of the potential cities that meet the criteria for solar power generation. Use the included country boundary shapefile in your map. Label the city names and important countries. Include a text box that briefly explains the criteria used in selecting these potential cities. The map also needs a map title, your name, legend, scale bar, north arrow, neat line, etc. Export the map to a PDF file with 150 dpi.

For the final map, you will create a large-scale map for your selected city from Question 3. Your client wants you to show the area where the 50-mile buffer around the city and the potential solar generation area (GRIDVALUE = 1 polygons in solar_vector) intersect. Use your skills from Lab 8 and the Intersect tool to find the area where these two layers intersect. You only need to find the intersected area around your selected city. To do this, you should select the buffer and solar_vector polygons near your city before running the Intersect ArcTool. The output features will thus be those intersected areas of selected features in each input layer. First set the selectable layers under Selection->Set Selectable Layers.

Set selectable layers

Then use the selection tool selection tool to select the appropriate polygons from the solar_vector and buffer layers for your city. Just click on the area where the two layers intersect and both polygons will be selected. See the example below:

Selecting polygons

Now use the Intersect tool in ArcTools to produce an output layer showing the intersected area (in green below).

Intersect

Map 3
Make a large-scale map showing your final selected city and surrounding area. Show potential site for the solar power station near your city (i.e., intersect polygon). DO NOT show the buffers and solar_vector polygons--just the intersect area of the 2 layers around your city. Be sure to show the elevation raster in your map. Include a text box that briefly explains the criteria used in selecting the best city and explain what the intersect polygon represents. The map also needs a map title, your name, legend, scale bar, north arrow, neat line, etc. Export the map to a PDF file with 150 dpi.

 

Question 4:

Is there uncertainty in this analysis? If you believe that there is uncertainty, which dataset or analytical step introduces the biggest uncertainty? Which dataset or analytical step was relatively certain?

 

Question 5:

What other datasets do you think would be useful for this analysis? Why?

8.0 Conclusions

This lab focused on a site-selection spatial analysis. The analysis used a combination of vector and raster datasets to arrive at a final anwer. Most of your new GIS skills have been used at some point in the analysis, including spatial selection, raster selection, atribute selection, vector overlay, attribute summary, and map design. In Advanced GIS (Geog 487), you will strengthen these skills without the structure and help found in these"cook book" labs. If you do not take Advanced GIS, your client and your instructor both wish you luck as you apply your new skills to real-world problems!

9.0 To turn in

  • The question sheet, with typed answers (Word document)
  • Table summarizing your potential cities by country
  • Map 1
  • Map 2
  • Map 3

Submit electronic files via email to your instructor, with the subject "G387, Lab 9, [your last name]".


The majority of the text in this lab was created by Sean Bennison in the Geography Dept. at UC Santa Barbara. The lab was modified by Matthew Clark for instruction at Sonoma State University.

This page was last modified on Aug 25, 2009 by Matthew Clark.