Lab 7: Cell, Neighborhood, and Zonal Statistics Exercise 1: Use the Cell Statistics function to detect change In this exercise, you will use the Spatial Analyst Cell Statistics function to compare the 1989 to 1992 land cover data for a portion of the Columbia River Estuary, which is near where the Columbia River feeds into the Pacific Ocean. The land cover is classified based on vegetation groups, bare land, water, and developed areas. These data are derived from work accomplished for the NOAA Coastal Change and Analysis Program (C- CAP). People working in C-CAP develop nationally standardized databases of land cover and habitat change in the coastal regions of the United States. Step 1: Open the map document Open the FindChange.mxd map document from your \Lab7Data\ folder. The map depicts 1992 land cover for a portion of the Columbia River Estuary in the northwestern United States. Expand the legend for the Land Cover 1992 layer in the Table of Contents and familiarize yourself with the different land cover types. Turn off the Land Cover 1992 layer to reveal the 1989 land cover for the same area. Toggle the Land Cover 1992 layer on and off. Notice the subtle changes in land cover between 1989 and 1992. When you have finished visually comparing the two land cover layers, leave both layers turned on. Step 2: Set the analysis environment Set the Environment Settings as follows: Set the Current Workspace and Scratch Workspace directories to your \Lab7Data\MyData folder Processing Extent: Same as Layer "Estuary Study Area" Raster Analysis cell size: Same as Layer "Land Cover 1992" Step 3: Use the cell statistics function to find areas of change Here you will use the variety statistic, which will count the number of different values occurring at each cell location. Because you are comparing only two raster datasets, change will be revealed when more than one land cover type is counted for a cell. From the Spatial Analyst Tools menu in ArcToolbox, expand the Local menu and double-click Cell Statistics. The Cell Statistics dialog lists the raster datasets in the active Data Frame. Click the Input raster dropdown menu and select Land Cover 1992. Add Land Cover 1989 the same way. Click the Overlay statistic dropdown arrow, and click Variety. Click OK. Rename the new layer Variety. The new Variety raster depicts where change has occurred. Step 4: Isolate areas of change with the CON function By default, the Variety raster is classified into nine classes, when in fact, there are only two values: 1 and 2. Open the attribute table for the Variety layer. There are many cells with a value of 1, which indicates no change in value between the two land cover rasters. Cells with a value of 2 indicate where land cover values have changed. You are only interested in areas of change, so you will create a new raster showing only those areas with a value of 2. You will create the new raster with an expression that uses a conditional statement. The expression will state that if a cell value in the Variety raster is greater than 1, then it should be given a value of 10 in the output raster. The conditional statement will not mention what to do with all the 1 values, so they will be given a NoData value in the output raster. By default, NoData values are transparent. 1
Close the Attributes of Variety table. Turn off the Variety layer and collapse its legend. Open the Raster Calculator and create this expression: Con("Variety" > 1,10) For the Output Raster change the name to luchange. C lick OK. The luchange raster is added to your map. Notice that only one value, 10, is displayed in the luchange layer legend. Rename the luchange layer Land Cover Change. Change the color of value 10 to black. Now the areas of change stand out against the Land Cover 1992 data. Key points The Cell Statistics function operates on multiple rasters occupying the same geographic space. In essence, it compares them, cell by cell, using a statistical method such as variety. You can use the Cell Statistics function to detect change. To isolate only what you are interested in, you can use another function, such as the CON function. If the cell values in the raster are measurements instead of codes, as in this exercise, the other statistical methods, such as Mean, Standard Deviation, and Sum are useful. Exercise 2: Use the neighborhood function to investigate the edge effect of land cover data A common theme among many research disciplines suggests that the place where different landscape patterns meet is where the action happens. This is called the edge effect. For example, planners and biologists might study areas where urban growth abuts the natural world. Geographers and economists might be interested in where different land uses come together and how markets and people transition between them. Forest managers and wild fire specialists are interested in the change between dominant vegetation types, where ladder fuels can contribute to fire behavior and intensity. The edge effect can vary in intensity. One of the ways to quantify the edge effect is to count the number of different edges occurring within a neighborhood. In this exercise, you are presented with a map of land cover types within a heavily forested area. Dominant vegetation types define the land cover. The patterns of different vegetation types are clearly distinguished, but the relationships between them are not. You will use the ArcGIS Spatial Analyst Neighborhood Statistics function to find the variety of different vegetation types within a specified neighborhood. In doing so, you will quantify the edges. Step 1: Open the map document Open the Landcover.mxd map document from your \Lab7Data\ folder. Land cover is classified as the dominant vegetation type. Compare the map with the Landcover layer legend in the Table of Contents. It appears that MIXED CONIFER FIR and RED FIR are the most dominant species in the study area. The rest of the land cover types are intermixed and distributed throughout the study area in smaller patches. From this perspective, the edge effect or relationships between the various land covers is not clear. Step 2: Examine the land cover layer attribute table Open the attribute table for the vegetation layer. The Landcover layer is a raster dataset. Notice that the data are discrete. Some codes, such as WA and BA, are not vegetation types, but rather the dominant landscape feature. For 2
example: Value 10, Vegtype BA, signifies barren landscape, which in this case, could be rock formations where little vegetation exists. The Neighborhood function works well with coded values, but the values must be numbers. Here you will use the Value field in your analysis because each number is unique and represents a specific type of vegetation. Close the table. Step 3: Set the analysis environment Set the Environment Settings as follows: Set the Current Workspace and Scratch Workspace directories to your \Lab7Data\MyData folder Processing Extent: Same as Layer "Study Area" Raster Analysis cell size: Same as Layer "Landcover" Step 4: Create a surface of land cover variety In this step, you will use the neighborhood function to create a new raster dataset that depicts the variety of vegetation types in the study area. In this case, you will use a rectangular neighborhood and the statistic type, variety, which determines a cell s value by counting the number of unique values in the neighborhood. For example, in the following graphic, a neighborhood of 5 cells by 5 cells might only contain 2 different vegetation types (1 = MIXED CONIFER FIR and 5 = RED FIR). Therefore, the value of the corresponding cell in the new raster will be 2. From the Spatial Analyst Tools menu in ArcToolbox, expand the Neighborhood menu, then double-click Focal Statistics. Fill out the Focal Statistics dialog as follows: Input raster Landcover Neighborhood Rectangle Height and Width 5 Units cell Statistic type variety The function will evaluate each cell in the Landcover layer using a 5-cell by 5-cell rectangular neighborhood. The variety statistic will count the number of unique values in the neighborhood and assign that number to the cell in the new raster. Each cell in the Vegetation layer will be evaluated the same way. Click OK. The new layer looks somewhat like a cross-section of a worm farm. One of the reasons for this is that the cell size for this analysis is set to 30 meters, which is fairly small for the study area, and the data values are grouped into contiguous areas, like islands. As the neighborhood passes from one cell to the next, variety increases at the edge or interface of two dominant vegetation types and decreases when the evaluated cell is closer to the center of the island. This has the effect of tracing the edges where vegetation types meet. Rename the new layer Variety. In the Table of Contents, collapse the Variety layer and collapse and turn off the Landcover layer. Step 5: Classify the variety raster By taking a moment to classify the Variety raster, you will be better able to distinguish where variety is highest. For this analysis, say that a cell value of 4 or more vegetation types is 3
considered high in variety and cell values of 2 or less are low in variety. Right-click the Variety layer and choose Properties. Click the Symbology tab. Choose Classified. Change the Color Ramp to the Blue Bright color ramp. Click the Classify button. In the Classification dialog, click the Method dropdown arrow and choose Defined Interval. Change the Interval Size to 2. Click OK. In the Layer Properties dialog, change the labels as follows: Based on the Low/Medium/High criteria, most of the study area seems to have a very low amount of variety, at least as far as dominant vegetation is concerned. There does seem to be a correlation between the medium variety areas and the streams, which might lead you to investigate that relationship further (e.g., is the distance to streams correlated with a higher variety). For this exercise, however, you are mainly concerned with finding areas where the intensity of the edge effect is highest. Make the Variety layer 45 percent transparent. Step 6: Compare the variety layer with the land cover layer One of the ways to visualize how the neighborhood function operates is to compare the output raster (Variety) with the original input raster (Landcover). Turn on the Landcover layer. Zoom in to the middle of the map so you can clearly see individual cells. Notice that, in this case, most variety occurs at the edges of smaller, intermixed patches of vegetation. Imagine the 5 by 5 neighborhood passing over each cell in the Landcover layer, counting the number of different vegetation types, then moving to the next cell. The areas of medium to high variety are occurring where the edges of 3 or more vegetation types are in close proximity. These are the areas that require further investigation. Combined with other factors such as slope, aspect, or proximity to water, certain areas may stand out more than others. For example, a biologist might identify habitats for specific animal species, or a wild fire specialist might target locations for ladder fuel management. Zoom to the full extent of the study area. Key points The Neighborhood Statistics function (also known as a focal function) evaluates the cell and however many cells are included in the neighborhood based on a statistic, such as variety or majority. The Neighborhood Statistics function evaluates every cell in the input raster and writes the results to the corresponding cell in the output raster. Exercise 3: Find the variety of vegetation types by zone In this exercise, you will use wilderness fire perimeters as zones, and you will also create your own zones to use with the Zonal Statistic function. The value layer for both analyses will be a vegetation layer. In this case, the vegetation data are classified into dominant vegetation type. Your goal is to find out how many types of vegetation were burned in each fire, and to discover whether the variety of vegetation burned differs by elevation. Step 1: Open the map document Open the NineFires.mxd map document from your \Lab7Data\ folder. 4
In this scenario, there have been a series of wild land fires in fairly rugged terrain, which is composed of heavily forested land. It would be interesting to know how many different types of trees and vegetation the fires affected, but it would also help to know where the variety occurred. Consider the following questions. First, what is the variety of vegetation within each of the fire perimeters? And second, does the variety of vegetation types change within different elevation zones inside the fire perimeters? Step 2: Examine the vegetation data Turn on the Vegetation layer. Expand the Vegetation layer in the Table of Contents. The data for the Vegetation layer has been classified by the dominant vegetation type or landscape characteristic. Step 3: Set the analysis environment Set the Environment Settings as follows: Set the Current Workspace and Scratch Workspace directories to your \Lab7Data\MyData folder Processing Extent: Same as Layer "Study Area" Raster Analysis cell size: Same as Layer "DEM" Step 4: Find the variety of vegetation within each of the fire perimeters In this step, you will use the Fire perimeters layer, which is vector data, as zones. Each fire perimeter polygon represents an individual zone. Unlike most other functions in ArcGIS Spatial Analyst, the Zonal Statistics function does not result in a new surface. Instead, it creates a table of statistics and an optional chart. From the Spatial Analyst Tools menu in ArcToolbox, expand the Zonal menu, and double-click Zonal Statistics. Fill out the Zonal Statistics dialog as follows: Input raster or feature zone data Fire perimeters Zone field Firenum Input value raster Vegetation Statistics type Variety Ignore NoData in calculations Turn on your Spatial Analyst Toolbar. In the main menu select Customize, Toolbars, and Spatial Analyst. Make sure your new layer is the active layer on the Spatial Analyst toolbar and click the Histogram button. A bar chart appears. Right-click in the chart window and click Properties. In the Graph Properties dialog, check the Show labels (marks) box. Next, click the Appearance tab and uncheck the Graph Legend box. Click OK. With the bars labeled, you can compare the chart with the map. For example, the bar labeled 1 in the chart can be compared to the fire perimeter labeled 1 in the map. It is important to note here that if you had checked the Join output table to zone layer box in the Zonal Statistics dialog, the labels for the Fire perimeters layer would have disappeared in the map because the field names change in the feature attribute table when the join takes place. Close the chart window. Step 5: Examine the zonal statistics table Create a table of the zonal statistics. From the Spatial Analyst Tools menu in ArcToolbox, expand the Zonal menu, and double-click Zonal Statistics as Table. Fill out the dialog as follows: Input raster or feature zone data Fire perimeters Zone field Firenum Input value raster Vegetation Statistics type All Ignore NoData in calculations The table contains a range of descriptive statistics. The statistics are based on the Value field in 5
the Value raster, which in this case is the Vegetation layer. The field, Variety, contains the number of different values within a zone. Keep in mind that some of these statistics may not be useful for your analysis. For example, the Majority field reports the value that occurs most often in the zone. Notice that in zone 2 the vegetation value 5 occurs most often. If you opened the attribute table for the Vegetation layer, you would see that the value 5 corresponds to the vegetation type, Red Fir. Thus, in fire perimeter 2, the vegetation type, Red Fir occurred most often. On the other hand, the Mean field reports the average value in the zone. In this case, the values are vegetation codes, which stand for classified vegetation types. Taking the mean of these codes is not informative because the statistic doesn t correspond with a quantified value. However, if the vegetation layer had not been classified and the cell values indicated the percentage of canopy cover, then the mean statistic would report the average percentage of canopy cover for a zone. Close the table. Step 6: Reset the analysis environment In this analysis, although the zone layer will be elevation zones instead of fire perimeters, you will still need to constrain the analysis to the fire perimeters. You can do this by setting the Fire perimeters layer as a mask. Open the Environment Settings dialog. For Raster Analysis mask, choose Fire perimeters. Click OK. Step 7: Create elevation zones In this step, you will use the Reclassify to reclass the DEM layer into elevation zones. The zones will represent bands of elevation ranges. Elevation can be an important factor affecting the types of vegetation growing there. Determining how the elevation zones are created can be based on your knowledge of vegetation types or research about the phenomenon that you are investigating, such as fire behavior. In this exercise, however, you will define the zones based on approximately 200-meter intervals. From the Spatial Analyst Tools menu in ArcToolbox, expand the Reclass menu, then doubleclick Reclassify. Fill out the dialog as follows: Input raster DEM Reclass field Value Change missing values to NoData Now select the Classify button. Within the classification choose the method of equal intervals and choose 6 classes. In this case, you are slicing the DEM layer into six zones using an equal interval method. Since the input DEM ranges from 1360 to 2597 meters, six zones will represent roughly 200-meters in elevation change each. Click OK. Rename the new sliced layer Elevation Zones. Open the attribute table for the Elevation Zones layer. Select the fourth record (Zone 4). Notice Zone 4 in the map spans several fire perimeters. Select the other records one at a time so you can observe how the zones are distributed. Clear the selected features. Close the table. Step 8: Run the zonal statistics function In this step, you will run the Zonal Statistics function again, but this time the zone dataset is the Elevation Zones layer that you created in the previous step. Remember, the Fire perimeter layer is serving as a mask, so analysis will only occur within those polygons. From the Spatial Analyst Tools menu in ArcToolbox, expand the Zonal menu, then double-click Zonal Statistics. Fill out the Zonal Statistics dialog as follows: Input raster or feature zone data Elevation zones Zone field Value Input value raster Vegetation Statistics type Variety Ignore NoData in calculations Click OK. 6
Open the Histogram and change the properties settings as you did in Step 4. Notice there are now five zones since zones 4 and 5 from the Elevation Zones layer have the same variety and have been consolidated. The variety of vegetation affected by these 9 fires is highest in Zone 2, an elevation range between 1600 and 1800 meters. The lowest variety of vegetation affected by the 9 fires is in Zone 5 (Zone 6 in Elevation Zones layer), the highest elevation range. Close the chart and the table. Key points The Zonal Statistics function requires a zone layer and a value layer. The zone layer can be vector data or raster data. With raster data, all cell values in a zone are the same. The Zonal Statistics function produces a new surface as well as a table of statistics and a histogram that can be accessed from the Spatial Analyst toolbar. Lab 7 Assignment Please produce hardcopy pdf with three figures that contain maps in proper layout form with legends, cartographic components, etc. for the following lab exercises. Each figure should have an associated caption that explains the data and the analysis. Look at captions of figures in primary literature for examples. Upload the pdf to the lab 7 assignment on ecampus. Map 1: Highlight areas of land cover change between 1989 and 1992 in the Columbia River Estuary (Exercise 1). Map 2: Highlight areas of varying variety within your study area (Exercise 2). Map 3: Display a zonal statistic of your choice (Exercise 3). 7