Sunteți pe pagina 1din 9

Assignment 7: Raster Data Analysis

Due March 9, 2012


Introduction
In the previous assignment you tried your hand at analyzing spatial data in vector
format. Although many GIS analytical operations can be applied to data in both
spatial data models, the specifics of their implementation could be very different.
The vector data model recreates the real world by representing its features as
collections of spatially referenced points and lines (arcs), and so the techniques
used to analyze vector data are based on geometric and/or topological
transformations. In the raster model, the Earths surface is conceptualized as a
grid. The objects located on it are represented as single cells or groups of cells,
depending on their extent. The raster model provides for a much closer link
between the spatial and aspatial characteristics of features with the attributes
stored directly in each grid cell comprising a feature. The methods used to analyze
raster data enabled by this data structure are very similar to mathematical
operations performed on matrices and are often referred to as map algebra.
This assignment will introduce you to basic analytical operations used to manipulate
and integrate raster data. The practical part of the assignment consists of the
guided tutorial based on selected sections of the ESRI web course Learning ArcGIS
Spatial Analyst followed by an on your own section.

Section 1: Theory
Textbook readings: Chapter 6 and lectures
Answers to these questions can be found in the textbook, in the guided tutorial, or
online. After reading the sources you find, please provide the answers in your own
words. If you use somebody elses wording, please reference the source.
Each question is worth 2 marks
1. Explain why, when working with raster data, measuring distance between two
points can result in several different answers?
2. Describe possible reasons for reclassifying a raster dataset.
3. Describe the principles on which the filtering operation is based.
4. What are the issues that affect the raster overlays?

1 | Page

Section 2: Guided Tutorial


This section of the assignment is based on the material of the ESRI web course
Learning ArcGIS Spatial Analyst. ArcGIS Spatial Analyst is an ArcGIS
extension that provides a set of tools for spatial analysis and modeling. After
completing this course, you will be able to:

Understand how ArcGIS Spatial Analyst fits into the geoprocessing framework

Set up an analysis environment

Run Spatial Analyst operations using a tool dialog box and a model

Convert between feature and raster data

Reclassify data

Build Map Algebra expressions

Use Map Algebra operators

Instructions
1. Go to: http://training.esri.com and select My Training from the left-hand menu.
2. Select My Virtual Campus Courses and then log in using the username and
password you created when you worked on Assignment 1.
3. Type the course access code I sent you into the Start a New Web Course box
and click Go.
4. You will see the course Learning ArcGIS Spatial Analyst appear in your
course list. Click on it to begin.
5. Save the data provided for this course on your H:\ drive or any other drive you
have a permission to write to, so that when you create or modify the datasets
you would be able to save these changes.
6. In Module 1, complete all of the section Working with ArcGIS Spatial Analyst.
In the section Preparing your data for analysis, do Convert vector data to
raster data and Reclassify an elevation raster exercises.
Notes:
Exercise Work with Spatial Analyst tools

Step 2: Enable the Spatial Analyst extension


To load the Spatial Analyst extension, from the Customize menu choose
Extensions option. When the Extensions dialog box opens, check the
Spatial Analyst check box and click Close.
2 | Page

Step 4: Setting the geoprocessing environment


In ArcGIS 10 the Environmental Settings dialogue box does not have the
General Settings option. All the settings mentioned in this step are
represented by separate options in the Environment Settings dialogue box.
For example, you can specify the current workspace and scratch workspace
though the Workspace option. To do that, click on Workspace text to
expand this section of the dialogue box and follow the instructions in the
tutorial.

Here is how the settings in the tutorial correspond to the options you have in the
ArcGIS Environment Settings dialogue box:
Tutorial
Current workspace

Workspace

Scratch workspace

Workspace

Extent
Raster Analysis Settings

ArcGIS 10

Processing Extent
Raster Analysis

Step 5: Run a Spatial Analyst tool from its dialog box


In ArcGIS 10 the progress of the process is tracked on the status bar at the
bottom of the ArcMap window, not in the progress window.

Steps 6 and 7: Run a Spatial Analyst tool using the command line
We are going to skip these two steps because the changes implemented in
ArcGIS 10 substantially altered this function. In ArcGIS 10, the Command Line
window has been replaced by the Python window, where you can execute
tools in command line style environment. This window can be accessed through
Geoprocessing Python. This window can also be opened by clicking on the
corresponding button on the Standard toolbar at the top of the ArcMap
window. Knowledge of Python language (or willingness and time to learn it) is
required to run tools and other functionalities from the Python window, which
is outside of the scope of this class. If you would like to learn more about Python
and the Python window, please refer to the following sections in ArcGIS Help:

What is the Python window?


What is ArcPy?
If you would like to experiment with running tools from the Python window,
open a tools dialogue box and click on Tool Help button. Each article

3 | Page

describing a tool contains sample Python scripts that you can copy and paste
into the Python window and then run.
Exercise Convert vector data to raster data

Step 2: Set the analysis environment


To set the analysis environment, follow the notes for Step 2 in the Work with
Spatial Analyst tools exercise above.
Exercise Reclassify an elevation raster

Step 5: Symbolize the new elevation range raster


To see which of the colour ramps is the Surface colour ramp, right-click on a
colour ramp currently displayed in the Colour Scheme box and uncheck the
Graphic View option. Now all the ramps on the drop-down list are shown as
text titles.
To change the class labels for the reclassified layer, click on the corresponding
label in the Symbology box and enter new text.
To set transparency to 45%, in the Layer Properties window switch to Display
tab.

7. In Module 2, complete exercise Working with operators in the Working with


operators and functions section.
Notes:
Step 8: ArcGIS 10 has only one all purpose Map Algebra tool called Raster
Calculator, which you are going to use in this step.
Syntax of the expression that you need to type in the Raster Calculator box
is different from what is given in the text of the exercise:
Over("GoodFarm","Landcover")
You can copy and paste it form the text of the assignment or you can enter it
in the box yourself. If you chose latter, start by locating the OVER tool on the
scroll-down list of tools on the right side of the dialogue box. Double click on
it to enter in into the expression box. Then locate the names of the raster
layers you want to perform the operation on and double-click on them to get
them entered into the box. Make sure that the layer names are entered
between the round brackets and are separated by the comma.

Step 9: Find differences between the NewLand and the Landcover layers
The expression you need to enter in this step is
4 | Page

Diff("Landcover","NewLand")

Step 10: Find suitable soils


The expression you need to enter in this step is
InList("Soils",[201, 204])
The InList tool is part of the Logical group of tool at the bottom of the
scroll-down list on the right side of the Raster Calculator dialogue box. You
can also find them as separate tool included in the Math Logical toolbox.

8. You do not need to submit results of your work for this section of the
assignment. You will rely on the skills you learned in this section,
however, to complete the on your own section that follows.

Section 2: On Your Own


In this part of the assignment you will use the knowledge and skills you have
learned so far in this and other assignments to perform a simple raster data
analysis. You will determine possible locations for a strawberry farm based on the
set of predefined criteria. Datasets you will be working with are located in
T:\Class\Geography\geog303\Assignment 7 folder.
The Problem
As a co-op student working for the Enterprise Saskatchewan, a provincial
government agency tasked with encouraging and supporting business development
in Saskatchewan, you are asked to determine the most suitable sites in the province
for locating a strawberry farm. The sites must be:

In an area that is sufficiently high above the sea level and would not be at
risk of frequent flooding. The acceptable elevation is determined to be more
than 500 meters above the sea level.
Close to a major city to ensure the quick access to the market for this
perishable produce. The distance of 50 km or less was found to be
acceptable.
Farms should not be located on moraines as it will make looking after and
harvesting strawberries difficult.
The farm should be located in an area where soil is suitable for agriculture.

Instructions
1. If necessary, start ArcMap and add the data from the Assignment 7 folder to map
document. This folder contains the following files:
lrgcity_lcc1 a dataset containing municipal boundaries of Saskatchewan
large cities (not including major water bodies)
moraines_lcc a dataset containing location of moraines
5 | Page

agric_lcc a dataset showing classification of soils based on their ability to


support agriculture
dem_sk_lcc a dataset digital elevation model for Saskatchewan
2. Examine the data you just added and describe the datasets using the table
below. This will help you to get a better idea what kind analysis you can perform
on the datasets and whether you would need to transform them before that.
Submit the table describing the data
Dataset

Projection and
coordinate
system

Data model

2 marks
Feature type
(if
applicable)

Cell size (if


applicable)

Type of values
stored (if
raster)

lrgcity_lcc1
moraines_l
cc
agric_lcc
dem_sk_lcc

Note that the large cities dataset includes some unconventional large cities in it.
This illustrates the issue of data quality when dealing with free digital data even
if it is obtained from reputable sources. For the purposes of this exercise, we will
leave this issue unaddressed.
3. Before you start the analysis, you need to develop a workplan determining the
sequencing of your operations. You can use the flowcharting approach you have
seen used in the ModelBuilder. Based on what you learned in the guided
tutorial, think about what operations need to be done first to provide inputs for
further analyses. You may create a draft workflow chart now and refine it later
after you have a better idea about the specific steps.
Hint: this problem is solved using two main steps transforming the data and
then integrating the transformed data sets to find the answer.
Submit a flowchart showing the workflow in your analysis

5 marks

4. Another step you need to do before starting to work with your data is to set the
geoprocessing environment. In the Environment Settings dialogue box, set
the parameters as follows:
Current workspace the folder where your input data is stored
Scratch workspace the folder where you would like to keep your output
datasets
Output coordinates Same as layer dem_sk_lcc
Processing extent Same as layer dem_sk_lcc
Cell size
Same as layer dem_sk_lcc
6 | Page

5. You will start your analysis with finding the areas of the province that are at the
elevation of more than 200 meters above the sea level using the Greater Then
tool. Examine the output dataset after it is added to the map document. Based
just on this criterion, where the potential sites for a strawberry farm are located?
1 mark
6. Next you will find which areas are within 50 km distance from a major city using
the Buffer tool from the Proximity set of the Analysis toolbox. Set the
parameters as follows:
Linear unit kilometres
Distance
50
Dissolve Type
All
Why did you need to use a tool from the Analysis tool box and not from a
toolbox that is part of the Spatial Analyst extension?
1 mark
7. Since the buffer dataset you just created in the previous step is a vector dataset,
you will need to convert it to the raster format. Open and examine the attribute
table of this dataset. It contains one polygon entity. Note that all attribute
values for this entity are set to zero (this is the default setting for the first entity
in any dataset). This will create a problem when you will try to convert the
polygons in this dataset to raster as in the raster world zero values may be
understood as the NoData category. You will need to change the value zero in
the Id field to one in order to be able to perform the conversion.
At the top of the ArcGIS window locate the Editor Toolbar button that looks
like this
and press it to open the Editor Toolbar. Click Editor Start
Editing. In the dialogue box that opens, select the name of the buffer dataset
and click OK to make it editable. Open the attribute table of the buffer dataset,
click in the Id cell that contains 0 and type 1 instead. Next click the Editor
option on the Editor Toolbar and choose Stop Editing. Choose yes when
prompted whether you want to save the edits. Close the attribute table and
close the Editor Toolbar. Now you are ready to convert the buffer dataset to
the raster format.
From the Conversion Tools toolbox call up the To Raster Polygon to
Raster tool. In the dialog box that opens, set the following parameters leaving
everything else at default:
Value field

Id

8. Next you will convert the moraine dataset to the raster format. What tool do you
need to use?
Hint: set the value field parameter to Type
1 mark
9. Now examine the agric_lcc dataset. The class values in this dataset correspond
to:
7 | Page

Class 1 Soils with no limitations affecting their use for crops


Class 2 Soils with moderate limitations which may restrict the range of
crops or require some (moderate) conservation practices
Class 3 Soils with moderately severe limitations which may restrict the
range of crops or require special conservation practices
Class 4 Soils with severe limitations which restrict the range of crops, or
necessitate special conservation practices, or both
Class 5 soils with very severe limitations which are best suited to the
production of perennial forage crops; improvement practices are feasible
Class 6 Soils with extremely severe limitations which are capable only of
producing native perennial forage crops; improvement practices are not
feasible
Class 7 soils with no capability for arable farming or permanent pasture
Class O organic soils (not rated in capability classification)
We will assume that only soils in Classes 1 and 2 as suitable for our purposes.
You will use the Raster Calculator to select these two soil classes from the
agric_lcc dataset and save them into a separate dataset.
What tool or operator did you use to perform this operation?
mark

The output data set has the two classes as separate categories, whereas for the
purposes of this assignment it is not important to know that the soil belongs to a
specific class, just that it belongs to one of the two suitable classes. To get read
of the additional information, you will reclassify values in this dataset from 1
and 2 o just 1 using the Reclassify tool.
10.Now you are all set for the next stage in our analysis. You have four datasets
that satisfy the criteria specified for potential locations of a strawberry farm.
Next step is to combine them into one dataset that will clearly show the answer
to question stated at the beginning of this exercise.
Recall that the desirable sites need to be located in areas safe from flood AND
close to large cities AND have soils suitable for agriculture. They also should
NOT be on a moraine.
First you will combine the datasets that contain the first three criteria, between
which a logical relationship AND exists. You will use the Raster Calculator to
multiply values in these datasets.
Can you explain why are we using this method to combine the datasets? What
other tools could be used to perform the same operation?
4 marks
What is the equivalent of this operation among the vector overlay tools?
2 marks
Hint: consider only polygon-on-polygon options
8 | Page

The output dataset created as a result this calculation contains two values 1
and 0. To make further analysis run smother, reclassify these values as follows:
1 to 1 and 0 to NoData.
The output of the reclassification shows all possible locations in Saskatchewan
where the three first criteria are met, i.e., these are areas located more than 500
meters above the sea level, close to large cities and that have soils suitable for
agriculture.
11.What is left in the analysis is to eliminate from this set of areas those that
happen to be located on a moraine. To do that you need to create a mask from
the ratsrized moraines dataset by reversing values in its cells. Those cells that
contain value 1 need to be reclassified to NoData and those that hold NoData
value need to be reclassified to 1. The reclassification will allow you to erase
the areas that do not satisfy the last condition (are on the moraine) when you
combine the results of your previous analysis with the moraines mask.
After you created the mask, use the Raster Calculator to combine the two
datasets.
What tool or operator have you used?
mark
What is the equivalent of this operation among the vector overlay tools?
2 marks

12.FINALLY, prepare a map showing results of your analysis using LetterPortrait


template.
To make the map more informative, add the province outline (province.shp) from
the Assignment 3 folder to your map document.
In the Table of Contents, change the name of the final output dataset to
Results of the Analysis and the class label to Potential sites.
If the legend appears too small, you can adjust its size by selecting it and
dragging on its corners until it reaches the desired size.
You can change the scale bar units to kilometres by clicking on the scale bar
and making this and other adjustments in the dialogue box that opens.
Title you map accordingly.
Submit a map showing results of your work

5 marks

9 | Page

S-ar putea să vă placă și