exercise 6: working with raster data in arcgis 9 · 1 exercise 6: working with raster data in...

11
1 Exercise 6: Working with Raster Data in ArcGIS 9.3 Raster Data Cell-based representation of map features. Each cell has a value. A group of cells with the same value represent a feature. Examples - satellite imagery, aerial photography and some come from software packages like GRID and ERDAS. We will use the following Spatial Analyst tools Clip a grid - masking Surface Analysis Grid attributes and Histograms Reclassify a grid Zonal statistics Raster Calculator View various types of raster data sets Map display options for raster data Distance analysis Simple grid models This exercise will demonstrate how to work with a digital elevation model for the Craig Mountain study area. We will then derive slope, aspect, hillshade and contours from the elevation model and perform queries and analysis on raster data. Notice: The Spatial Analysis Extension must be turned on when working with raster data. Add the Spatial Analyst Extension from the Tools – Extensions menu. Check Spatial Analyst. Add the Spatial Analyst Toolbar from the View – Toolbars menu Why Spatial Analyst? Grid query Grid algebra Grid statistics Summary by zone Proximity mapping Reclassification Histograms Surface analysis Slope, aspect, contours Grid/ Vector conversions Surface interpolation from point samples Density calculations Masking (clipping) grids Display raster formats such as .tif, .sid, and other images

Upload: trinhminh

Post on 02-Jul-2018

214 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Exercise 6: Working with Raster Data in ArcGIS 9 · 1 Exercise 6: Working with Raster Data in ArcGIS 9.3 Raster Data Cell-based representation of map features. Each cell has a value

1

Exercise 6: Working with Raster Data in ArcGIS 9.3

Raster DataCell-based representation of map features. Each cell has a value. A group of cells with the same value represent a feature.

Examples - satellite imagery, aerial photography andsome come from software packages like GRID and ERDAS.

We will use the following Spatial Analyst tools

• Clip a grid - masking • Surface Analysis • Grid attributes and Histograms • Reclassify a grid • Zonal statistics • Raster Calculator • View various types of raster data sets • Map display options for raster data • Distance analysis • Simple grid models

This exercise will demonstrate how to work with a digital elevation model for the Craig Mountain study area. We will then derive slope, aspect, hillshade and contours from the elevation model and perform queries and analysis on raster data.

Notice: The Spatial Analysis Extension must be turned on when working with raster data. Add the Spatial Analyst Extension from the Tools – Extensions menu. Check Spatial Analyst. Add the Spatial Analyst Toolbar from the View – Toolbars menu

Why Spatial Analyst?

• Grid query • Grid algebra • Grid statistics • Summary by zone • Proximity mapping • Reclassification • Histograms • Surface analysis • Slope, aspect, contours • Grid/ Vector conversions • Surface interpolation from point

samples • Density calculations • Masking (clipping) grids • Display raster formats such as .tif,

.sid, and other images

Page 2: Exercise 6: Working with Raster Data in ArcGIS 9 · 1 Exercise 6: Working with Raster Data in ArcGIS 9.3 Raster Data Cell-based representation of map features. Each cell has a value

2

Step 1: Start a new project or use your ‘old’ Craig Mountain project. Add the following layers from the c:\NR502\craig folder if they are not already in your project: Craigveg_utm raster dataset of cover types on Craig Mountain (GAP data) Elevation digital elevation model

Craig_bnd vector, Craig Mountain boundary Stream vector, streams 1:100,000 scale USGS Roads vector, roads 1:100,000 scale USGS

Containment fire area vector, Maloney Creek fire boundary August 2000 Clip grid - Masking The boundary for Craig Mountain covers only a small portion of the elevation model. In the next step we will clip (mask) out the Craig Mountain area from the elevation model

Read through this procedure and then proceed to Step 2 and follow instructions Notice: You can not directly clip a grid with a boundary. The Geoprocessing Wizard can only be used to clip vector data, not raster data. Instead of clipping you use a process called masking with the following steps:

1. Create a maskgrid from the study-area boundary (Convert – Feature to Raster) 2. Set the analysis extent, cell size and mask under the Options menu option

Set the Analysis Extent to be the maskgrid Set the Analysis Cell size to be the same as the grid you are going to clip Set the Analysis Mask to the maskgrid

3. Use the Raster Calculator to create your final clipped grid. In the Raster Calculator simply double click on the grid you are clipping from and then click Evaluate.

Step 2: Create a ‘maskgrid’ from the Craig mountain boundary. Select Convert – Feature to Raster in the Spatial Analyst menu. - Choose craig_bnd for the input feature. - Choose boundary_id for the field. The field determines what value the grid will have, in this case it doesn’t matter what the value is as long as it is not too large. Area is often a large number and therefore a poor choice for the Field. - Choose 30 for the cell size - Select and output folder and name the output grid. You have now created a grid with cell size 30 and the same extent as the craig_bnd shapefile.

NOTICE! If you are using ArcGIS ArcInfo you can use the Spatial Analyst tools (Extract) in ArcToolbox to mask grids.

Page 3: Exercise 6: Working with Raster Data in ArcGIS 9 · 1 Exercise 6: Working with Raster Data in ArcGIS 9.3 Raster Data Cell-based representation of map features. Each cell has a value

3

Step 3: Select Options in the Spatial Analyst menu. Under the General tab, set the working directory to c:\NR502\craig. Set the Analysis mask to Craig mask.

Step 3 continued: Set the Extent to be the same as Craig_mask. Set the cell size to be the same as Elevation. Click OK.

Step 4: Start the Raster Calculator in Spatial Analyst. Double-click on elevation. Click Evaluate. An elevation grid with the extent and cell size of the analysis mask will be created.

Page 4: Exercise 6: Working with Raster Data in ArcGIS 9 · 1 Exercise 6: Working with Raster Data in ArcGIS 9.3 Raster Data Cell-based representation of map features. Each cell has a value

4

Grids created in Spatial Analyst will be temporary grids until they are saved as permanent grids. A temporary grid will be erased when you end your ArcMap session. If you want to save a grid permanently…. Right-click on the temporary grid in the Layer-table and select Make Permanent…

Step 5: Right-click on the newly created grid (Calculation) and select Make Permanent….

You can find out where the grid is located and what the name is in the Layer Properties. Right-click on the layer and select Properties. Look under the ‘Source’ Tab.

Page 5: Exercise 6: Working with Raster Data in ArcGIS 9 · 1 Exercise 6: Working with Raster Data in ArcGIS 9.3 Raster Data Cell-based representation of map features. Each cell has a value

5

Surface Analysis Step 6: Derive Contours, Slope, Aspect and Hillshade from the Craig Mountain Elevation model. Use the options under the Surface Analysis tab in Spatial Analyst.

Tip – Create an attractive display of an elevation grid

1. Create a hillshade from the elevation grid 2. Move the elevation grid above the hillshade in the Layer table 3. Display the elevation grid at 50% transparency (Right-click on elevation

grid - Properties – Display).

Floating –point grids If you try to open the attribute table for the slope or aspect grids the ‘Open attribute table’ option is not be available. Slope and Aspect are floating-point grids. Cells in floating-point grids have decimals and would therefore have an infinite number of ‘values’ – it is impossible to have an infinitely long value attribute table. Floating point grids can be reclassified in order to create grids with value attribute tables.

Page 6: Exercise 6: Working with Raster Data in ArcGIS 9 · 1 Exercise 6: Working with Raster Data in ArcGIS 9.3 Raster Data Cell-based representation of map features. Each cell has a value

6

Grid attributes and Histograms Step 7: Add the grid c:\NR502\craig\craigveg_utm to ArcMap (if not already added). Display the grid with Unique Values based on the Cover_type attribute. Step 8: Open the attribute table for craigveg_utm.

All grids have at least two attributes: VALUE and COUNT. VALUE – Always a numeric. The value in an elevation grid represents the elevation (in meters or feet). The value in a grid such as Craigveg_utm is a numeric code for the vegetation class. Each numeric code represents a cover type such as Ponderosa pine or Foothills grassland. Example: in the grid Craigveg_utm VALUE 3101 corresponds to Foothills Grassland. In this case there is also an attribute Cover_type that explicitly lists the cover type name. This is not always the case. COUNT – Count shows the number of grid-cells that has a particular value. Example: In the grid Criagveg_utm 237571 cells has the VALUE 3101 - Foothills grassland . The area on Craig Mountain covered by Foothills Grassland is 30 x 30 x 237571 square meters.

Area = cell-size * cell-size * count

Page 7: Exercise 6: Working with Raster Data in ArcGIS 9 · 1 Exercise 6: Working with Raster Data in ArcGIS 9.3 Raster Data Cell-based representation of map features. Each cell has a value

7

Step 9: Display a histogram of the grid Craigveg_utm. Select layer. Click the histogram-icon.

Step 10: You can then select the identify icon and click on any of the bars in the histogram to display the cell count within that class. This function may not work in ArcGIS 9.3 (if so, move to the next step).

Page 8: Exercise 6: Working with Raster Data in ArcGIS 9 · 1 Exercise 6: Working with Raster Data in ArcGIS 9.3 Raster Data Cell-based representation of map features. Each cell has a value

8

Reclassify In many applications you may want to reclassify a grid layer. In this example we will reclassify the grid theme craigveg_utm – the cover-types on Craig Mountain. The Craig Mountain cover-types are broken up in many categories. Reclassify the cover-types into the following broader categories:

Coniferous forest (1) Shrub land (2) Grassland (3) Riparian (4) Rock (5) Water (6) Agriculture (7)

Step 11: Select Reclassify in the Spatial Analysis drop-down menu.

Step 12: Press Unique to classify each unique cover-type into a new category. Enter the new values in the ‘New Value’ column. The ‘New Value’ must be a numeric! Place the cursor on “NoData’ (the last line) and click OK.

Step 13: Use the Layer Properties (Symbols tab) to label the reclassified vegetation categories.

Page 9: Exercise 6: Working with Raster Data in ArcGIS 9 · 1 Exercise 6: Working with Raster Data in ArcGIS 9.3 Raster Data Cell-based representation of map features. Each cell has a value

9

Distance The Distance function in Spatial Analyst creates grids displaying the distance to a selected feature (points or lines). In this example we will create a grid displaying the distance from the major streams on Craig Mountain. You will query for streams that are NOT intermittent (i.e. major perennial streams).

Step 14: Select the major streams on Craig Mountain. Choose Selection in the main menu and the Select by attribute. Layer: streams Method: Create a new selection Query: ‘Describe’ <> “INTERMITTENT” Apply

Step 15: Select Distance in the Spatial Analyst menu, then select Straight line… Calculate the distance to streams. Output cell size: 30 m Give the output grid a name.

Step 16: Work with the layer properties to display the distance grid in 5 classes in 200 m increments (0-200, 200-400, 400-600, 600-800, > 800)

Page 10: Exercise 6: Working with Raster Data in ArcGIS 9 · 1 Exercise 6: Working with Raster Data in ArcGIS 9.3 Raster Data Cell-based representation of map features. Each cell has a value

10

Zonal statistics

Step 17: Use the Zonal statistics function to determine the mean elevation and the elevation range for the reclassified cover types on Craig Mountain.

Select Zonal Statistics in the Spatial Analyst menu.

Save your project – you will use many layers created in this project for the next Exercise!!

With the Zonal statistics function, a statistic is calculated for each zone of a zone dataset based on values from another dataset. A zone is all the cells in a raster that have the same value, regardless of whether or not they are contiguous. However, both raster and feature datasets can be used as the "zone dataset". So, for example, residential is a zone of a landuse raster dataset, or a roads feature dataset can be the zone for an accident dataset. Zonal statistical functions perform operations on a per-zone basis; a single output value is computed for every zone in the input zone dataset. Why use Zonal Statistics You might calculate the mean elevation for each forest zone or the number of accidents along each of the roads in a town. Alternatively, you might want to know how many different types of vegetation there are in each elevation zone (variety). See ArcGIS HELP for further information.

Select the reclassified vegetation data set as the Zone dataset. Zonal field is Value. Value raster: elevation Calculate the MEAN elevation Name the output data table.

Page 11: Exercise 6: Working with Raster Data in ArcGIS 9 · 1 Exercise 6: Working with Raster Data in ArcGIS 9.3 Raster Data Cell-based representation of map features. Each cell has a value

11

Deliverables Exercise 6

1. Create a proper map of the reclassified vegetation (7 types) for Craig Mountain (Step11-13). Include on the map (or in a separate table) the area of each vegetation type.

2. Reclassify the slope for Craig Mountain into 5 classes: Class 1 – 0-10, Class 2 –

10-20, Class 3 – 20-30, Class 4 – 30-40, Class 5 > 40. Create a proper map layout showing the classified map and the area within each slope class.

3. Approximately, how much area on Craig Mountain is within 200 meters of a

major (not intermittent) stream? (see Step 16)

4. What is the mean elevation of each reclassified vegetation types on Craig Mountain? (The answer is the table you created in Step 17.)

Combine all maps, tables etc. into one Word or pdf document before you submit on Blackboard.