Vous êtes sur la page 1sur 10

Practical Exercise 8

Raster Analysis

Department of Physical Geography and Ecosystems


Analysis, and GIS Centre at Lund University, Sweden

Introduction to Geographical Information Systems

GISA01
Raster Analysis

8 Raster Analysis

8.1. Purpose
The purpose of this exercise is to exemplify how you can use raster data, as well as
topographic analyses, to solve practical problems. Raster analyses are most suitable when
working with events that vary continuously in space.
You will do a simplified, but realistic, localisation analysis for the construction of a new
dumpsite using raster GIS. Considerations will be taken concerning some basic criteria,
which will affect the choice of the location. In a real case scenario, one would most
probably take more conditions into considerations concerning the area of interest, such as
the kind of garbage that is to be disposed and environmental aspects.

8.2. Data
In Moodle, you can find a zip-file with the name DATA8_Raster_Analysis. Download
and save the file to your computer and use WinZip to unzip the files. The unzipped files
contain the following data:
House ESRI GRID binary format: house (directory).
Roads ESRI GRID binary format: roads (directory).
Watercourse ESRI GRID binary format: watercourse (directory).
Elevation ESRI GRID binary format: elevation (directory).
Create a folder in your local working directory with the name 8_Raster_Analysis (e.g.
C:\GISA01\Practical\8_Raster_Analysis). It is recommended that you keep an organized
file structure on your computer.

Note: For this exercise it is important that have installed the latest service
pack. The latest service pack for your version of ArcGIS is available on the ftp-
server or at ESRIs Support Center (http://support.esri.com/). Instructions on
how to access the ftp-server can be found in the document How to download
software via ftp in the section General Information on the course
homepage.

28-01-2010 Copyright 2010. Lund University GIS Centre. All rights reserved. 1
Raster Analysis

8.3. Background
As previously mentioned, you will perform a localisation exercise by proposing suitable
locations for a new dumpsite. To do this, you will have to take in consideration the
following criteria for each of the available datasets:

Data set Criteria

House Because of hygienic reasons, you must place the dumpsite at


least 1500 meters away from all settlements.

Roads To reduce expenses for transportation, the dumpsite should be


placed less than 2000 meters away from an existing road.

Watercourse To avoid hazardous emissions from the waste, the dumpsite must
be placed at least 1000 meters away from watercourses.

Elevation To avoid hazardous wastewater poisoning nearby areas, the


dumpsite must be placed on slopes with less than 9 %
inclination.

The analysis will be done using Boolean algebra. A Boolean choice can only assume one
of two values (true/false, yes/no etc) Therefore, depending on the acceptance or rejection
of a criteria, the cell values in the raster data layer should consist of either a 0 or a 1,
which correspond to 1 = accepted and 0 = rejected.

8.4. Answers to be sent to teachers


All students have to send in one document containing a map and the answers for
questions 8.1 8.4 by email to the teachers as indicated in the document Sending
Answers to Teachers available in the section Course Information on the course
homepage.

8.5. Method

8.5.1. Exploring and viewing the data


You will begin by studying the available data. You will then produce a number of raster
layers for accepted and rejected areas on the basis of the criteria listed in the table

28-01-2010 Copyright 2010. Lund University GIS Centre. All rights reserved. 2
Raster Analysis

previously presented. You will then overlay the raster layers to be able to locate all the
possible areas for the new dumpsite, taking in consideration all of the criteria.
- Start ArcMap and choose to open A new empty map.
- Change the map units so it is in meters. (View > Data Frame Properties, tab
General).
To be able to work with raster data in ArcMap you must activate the Spatial Analyst
extension.
- Click Tools > Extensions in the main menu and activate Spatial Analyst. To
display the Spatial Analyst toolbar select Spatial Analyst in View > Toolbars.
- Add the raster data sets House, Roads, Watercourse and Elevation to your map
document (File > Add data).
- Examine the properties of the data by studying the information in the Layer
Properties dialog window (right click the dataset in the Table of Contents
(TOC) and select Properties from the dropdown menu).

Question 8.1: What cell size do the different layers have and how many columns and
rows do they consist of (all 4 layers)?

In the Symbology tab, you can choose to change the colour settings, symbology method
and a lot more. You will now change the way the raster images are displayed.
- Right click Elevation in the TOC and choose Properties. In the Layer
Properties window click the tab Symbology.
- Click Classified in the box Show to the left. A dialog box asking you to
compute a histogram might appear. If so, choose to compute a histogram by
simply clicking Yes.
- Change the number of classes to 9 in the Classes drop down menu.
The Labels for the value ranges that are being shown have an inappropriate number of
digits.
- Left click the header Label and choose Format Labels. The Number Format
display window appears. Make sure Numeric is selected in the box Category,
change the number of significant digits to 2 then click OK to go back to the
Symbology dialog window.
Now, lets change the color scheme.

28-01-2010 Copyright 2010. Lund University GIS Centre. All rights reserved. 3
Raster Analysis

- In the colour ramp drop down list, right click on the color bar (not the drop-
down arrow) and in the context menu that appears click Graphic View to
uncheck it. Color schemes are now shown as text instead of graphics.
- To change color scheme, click on the drop down arrow of the Colour Ramp and
then select the color scheme Red to Green Diverging, Bright.

Now the colors have changed, but we want reverse the color pattern so that red colors
symbolize high values and green colors symbolize low values.
- Left click the header for Symbol and choose Flip Colors in the context menu
that appears. The colors should now have been reversed. Click OK in the Layer
Properties dialog window to apply all of the changes made.
- Now, change the way the layers House, Watercourse and Roads are visualized
by right clicking on each of the layers and then choosing Properties >
Symbology. Since these layers are not divided into any gradient values, choose
Classified and then choose to set the color for 1 in each layer to an appropriate
color by double clicking the symbol. Blue for Watercourse and black for Roads
for example. Make sure NoData is displayed with no color in each of the layers.
When this is done, you might have an image that looks something like this:

28-01-2010 Copyright 2010. Lund University GIS Centre. All rights reserved. 4
Raster Analysis

Note: If the image does not look like the one above, make sure to change the
drawing order so that the layer Elevation is at the bottom in the TOC.

- Try to locate the most northerly situated house in the map display window then
use Identify to find the elevation of the most northerly situated house. If you
want you can use the magnifier window for this purpose (Window > Magnifier).

Question 8.2: At what altitude (elevation) is the most northern house situated?

8.5.2. Localization analysis

8.5.2.1. Calculating straight line distances


It is now time to begin with the localization analyses. Check the criteria in the first table
for the four layers again. The first requirement is to locate all areas at least 1500 meters
away from any settlement. Areas near the settlements will be given the value of 0
(rejected) and areas more than 1500 meters away will be given the value 1 (accepted).
We will solve this by calculating Euclidean distances from houses.
- In the Spatial Analyst toolbar click Spatial Analyst > Distance > Straight Line.
- In Straight Line dialog window, make sure that House is selected in the drop
down menu Distance to, then specify an output cells size of 50 and click OK.
We choose not to define any maximum distance since we want all cells to be
taken into consideration.

28-01-2010 Copyright 2010. Lund University GIS Centre. All rights reserved. 5
Raster Analysis

A temporary raster layer is created in which every cell value correspond to the distance
from the nearest house. You can check this by using the Identify and Measure tools in the
Tools toolbar.

Note: By default output images from some of the functions in Spatial Analyst
are temporary. You can make a temporary raster layer permanent by right
clicking it in the TOC and then by clicking Data > Make Permanent.

8.5.2.2. Reclassifying
To get a layer with only two classes (1 and 0), you must reclassify the image so that all
the cells with values less than 1500 get the value 0 (rejected) and all other values get the
value of 1 (accepted). This is done by reclassifying the temporary layer that you just
created.
- In the Spatial Analyst toolbar click Spatial Analyst > Reclassify. The Reclassify
dialog window appears.
- In Reclassify choose Distance to house in the Input raster drop down menu. A
whole set of values will appear in the Set values to reclassify box.
Since we are only interested in reclassifying the cells into two classes, we want to change
the number of classes to two.
- Click on the button Classify to open the Classification dialog window. Here,
you can define different classification methods for your data, number of classes,
intervals etc.
- In the Classification dialog window change the number of classes to 2. Then
change Break Values by simply clicking on the numbers and writing your own
settings (in this case the first breakpoint should separate all the areas that are

28-01-2010 Copyright 2010. Lund University GIS Centre. All rights reserved. 6
Raster Analysis

less than 1500 and the second should be set to maximum to cover the rest).
Click OK to apply.

- Back in the Reclassify dialog window, change the New value in the class for the
first interval 0 - 1500 so that it is assigned a value of 0 and the rest a value of 1,
and then click OK.
You should no have produced an image of your area with all the suitable places for a new
dumpsite according to the criteria for the settlements (1 for accepted and the rest as 0).
- Use the same procedure to calculate straight-line distances and to reclassify the
layers Roads and Watercourse but according their criterias.
Once this is done, you should have three data layers with accepted and rejected cells for
House, Watercourses and Roads. The fourth requirement concerns the topography of the
area.

8.5.2.3. Calculating slopes


If you have data on topography, you can use the Slope function to calculate slopes for an
entire raster. The output for slopes can be in either degrees or percent. Every cell in the
output will have a slope value and the higher the value the higher the slope. You will now
use Slope to calculate steepness in percent by using the Elevation layer.
- In the Spatial Analyst toolbar click Spatial Analyst > Surface Analysis > Slope
to open the Slope dialog window.

28-01-2010 Copyright 2010. Lund University GIS Centre. All rights reserved. 7
Raster Analysis

- Make sure Input surface is the layer Elevation. Then set Output measurement to
Percent and click OK to create the temporary output raster.
When output measurement is set as percent a slope angle of 45 degrees correspond to 100
percent. As slope values come up to 90 degrees the percentage of the slope approaches
infinity.
- Reclassify the output according to the criteria for the layer Elevation.
You should now have created all the layers to be used in the final analysis. Make sure to
check the criteria for all of the layers before you proceed so that suitable cells are
classified as 1 (accepted) and non-suitable cells are classified as 0 (rejected). Your next
step is to combine the four output layers, which fulfils the criterias, to find suitable areas
for placing the dumpsite.

8.5.2.4. Raster calculations


The Raster Calculator is a function in ArcGIS which allows you to perform
mathematical calculations on datasets by using several operators and functions.
- Click Spatial Analyst > Raster Calculator. The Raster Calculator window
appears.
In the box Layers, you can choose from all of the layers you just created. You will now
choose your four reclassified images and combine them through using a Boolean
operator. There are four different Boolean operators to choose from. In this case, the ideal
location for the new dumpsite should be where 1s are found in all of the four reclassified
layers.

AND Checks for conditions that are common in two or more sets of
data. For example, the condition must be fulfilled within all
datasets.

OR Checks for conditions that exist in at least one of the datasets.

XOR The conditions must be fulfilled in one of the datasets but NOT in
both.

NOT This operation states which condition that must not be fulfilled.

Question 8.3: Which Boolean operator is suitable in this case (AND, OR, XOR,
NOT)?

28-01-2010 Copyright 2010. Lund University GIS Centre. All rights reserved. 8
Raster Analysis

- Double click the different layers to add them to the Expression box. Combine
them in a Boolean sentence and then click Evaluate to run the expression.
A new image will appear, and all cells suitable for placing the new dumpsite should have
the attribute value 1.
- Save this image by right clicking on it in the TOC and choosing Make
Permanent.
Try to find out the percentage of the area that is suitable to place a dumpsite.

Question 8.4: What is the percentage of the study area that is suitable for the
location of the new dumpsite?

- Now put some time into creating a layout where you show the suitable and non-
suitable areas. Export your layout as an image by using File > Export Map, and
insert the image in a Word document together with your answers to all of the
questions.

End of Practical Exercise 8

Send your answers to the teacher as instructed

28-01-2010 Copyright 2010. Lund University GIS Centre. All rights reserved. 9

Vous aimerez peut-être aussi