Lab 2: Exploring Fragstats

In this lab you will explore how the landscape around Edmonton, Alberta (Google Map) has changed over time (1966 to 1976). You will do this by examining some Fragstats metrics, as well as by creating a transition matrix that explicitly shows the transformation of land uses over time. The report you are to prepare should be written from the perspective of a consultant (who could be an urban planner, an agriculturalist, an environmentalist, an outdoor enthusiast, etc.--your interpretation of the results would reflect your particular perspective on the direction / nature of the changes you observe) (following these guidelines).

You must first download the Canada Land Use Monitoring Program (CLUMP) data for Edmonton from the Geogratis ftp archive site for (i.e., and Unzip the files, and store the data in C:\temp\Lab2\ (or in whatever directory you consistently store your lab work). FYI: GeoGratis does not exist anymore--the web site / search engine was replaced by the Open Government Portal which, unfortunately, doesn't include the CLUMP datasets.

Step 1: Download the data from the Geogratis ftp archive:

  1. Go to the Geogratis ftp archive site.
  2. Scroll down to clump_psutc and enter the directory.
  3. Go into clump_1966 and click on file should automatically download.
  4. Go up one directory and then into clump_1976, and download the Edmonton CLUMP file.
  5. UNZIP the two files to C:\temp\Lab2

Open the Readme file from one of the ZIP files in order to identify the datum and coordinate system associated with the data, and scroll down until you find the legend information. It would be helpful if you cut / pasted the legend text (Valid CLUMP land Use Codes) into a new Notepad txt file (e.g., save it as legend.txt).

A description of the land uses documented in CLUMP (e.g., what is included in 'outdoor recreation' lands) is available here. Don't forget: ArcMap Etiquette

Although we won't be exploring this aspect of the data in this class, the land use classification used in the first set of CLUMP maps (from 1966 through to 1976) was changed for the later set of maps (from 1981 to 1986). This change in the attribute resolution would affect any temporal analysis we could make of the data (an example of how changes in the classification scheme changes our view of a landscape is presented below--Figure 5.5 from the text Landscape Ecology).

Some of the important concepts you should become familiar with before using the program--some landscape ecology terms--can be found here.

Step 2: Importing and organizging the data:

Start ArcMap. Within ArcToolbox, import the interchange file (EDMAB##u.e00) (Conversion Tools / To Coverage / Import from E00). In the Import window, save the file in C:\temp\Lab2\ as EDMAB## [where ## is the year of your CLUMP file] and leave the File type as Basic types. It may appear that the import process fails, but if you click on the Add file button [+] you should be able to find the coverage file in C:\temp\Lab2\.

Do not go into the EDMAB## directory when adding the file (that is, do not double-click on the coverage), simply click on the coverage name and click on Add. (When displaying the vector [or raster] land use files, you should import the legend scheme from one map to the other in order to be able to quickly visually compare the two maps.) Given the various issues that will arise later in this lab--related to storing data in a geodatabase--I recommend that you do NOT use a geodatabase to store any data related to this lab.

Convert the vector files to raster files (one for 1966, one for 1976) with a resolution of 100m. (This is where setting the defaults for parameters (under Geoprocessing Environment) for the current and scratch workspaces to your lab directory, and setting the Default cell size (to 100) under Raster Analysis would be vey helpful.)

(ArcToolbox / Conversion Tools / To Raster / Polygon to Raster) (Specify "USE" as the Value field in your conversion and set the output file format to GRID--which you achieve by NOT providing an extension to the file name--just enter EDXX [e.g., ED66 & ED76] as the output file name.)

However, as Fragstats cannot read ArcMap 10.x raster / grid files you will also have to create a GeoTIFF file by exporting the grid data after you perform the conversion. To do this, right-mouse click on each EDXX file, select Data -> Export Data. Ensure that the output location is C:\temp\lab2, set the output format to TIFF, and name the file EDxx.TIF (e.g., ED66 & ED76). (I found that COMBINE [used later in the lab exercise] does not work properly with TIF files, which is why we need to produce both Arc GRID files and TIF files.)

Step 3: Providing metadata for Fragstats:

In order to assist you in your interpretation of the Fragstats results, it is useful to explicitly state what CLUMP land uses are associated with each raster class. In order for Fragstats to know what the classes actually refer to (e.g., that class 1 represents Cropland), you need to create a class descriptors file for each year. This is a text file (with the extension fcd) that lists ID, Name, Enabled, IsBackground, where ID refers to the grid value associated with a particular land use, Name refers to the associated CLUMP land use, Enabled is a binary variable [true or false] that indicates whether that class should be included in the analyses [true] or not [false], and IsBackground is another binary variable [t or f] that tells Fragstats to either include that class in the analyses [false] or to treat that class as a background class [true]. There should not be any blank lines in the fcd file (if so, the program will not run).

The easiest way to create the class properties file is to open the legend.txt file that you saved earlier (note that you will have to remove any commas "," associated with the land use names). Then, using the information contained in the raster attribute file you can create the class properties file (Open the Attribute Table in ArcMap; you need to replace the CLUMP codes in the legend.txt file with the GRID ID's from the raster attribute table). Here is an example of the steps / files you should use in creating your FCD file (note that the order of the entries doesn't matter, and that unmapped areas should be considered as the background class). Read over the Fragstats help file on creating the class descriptors file for further details (open help and search for fcd). It is important that the syntax rules for the class properties file be followed (that is, each field should be terminated by a comma, and there are no commas elsewhere in the file), or you will run into problems. Once you have created the fcd file, Save As the file by explicitly setting the extension to .fcd. (Here is a template fcd file you can start with.)

Note: When producing your final maps you can import the land use codes (extracted from the readme.txt file into legend.txt) into ArcMap, and then join that table to your vector or raster layers in order to have the land use names displayed in the legends (I describe this process below).

To add the fcd file to your Fragstats analysis, you need to point to the file in the Common Tables section, as described below (noting that there should be a unique fcd file for each year).

Step 4: Start Fragstats, and create a New file: (these instructions are for Fragstats version 4.1 installed in the Geography Department computer labs; if you are using version 4.2, use this version of the lab)

  • Batch Management:
    • Click on Add layer...
    • select GDAL GeoTIFF grid as the Data input dataset type,
    • select one of your two gridded (TIFF) files as the input file (e.g., ED66.TIF),
  • Common Tables:
    • select the appropriate fcd file (e.g., ED66.FCD),
    • specify a fixed edge depth of 100 m (click on the check box, and set the value to 100 by clicking on the
      to the right of the Not Set text box.
  • under the Analysis parameters tab
    • check that 'Automatically save results' is selected,
    • provide an appropriately named output file name (such as ED66F--Fragstats will create several output files using this name; make sure the correct output directory is selected)), and
    • Under Multi-level structure (Tabular output],
      • select the Class and Landscape metrics checkboxes.
  • Select the output statistics for the Classes and the Landscape, as described below.

Accept the program defaults for all of the other values. Note that you have to run Fragstats two times, once for each raster file, and that the FCD file is specific to each raster file (i.e., you need to create two FCD files).

For the purposes of this lab you will only be examining a few selected metrics for each of the three grid files:
Class metrics

  • Area - Edge tab, select:
    • Total Area (CA),
    • Percentage of Landscape (PLAND),
    • Total Edge (TE),
    • Coefficient of Variation (CV) of Patch Area (Area_CV)
  • Shape tab, select
    • Shape Index -- mean (Shape_MN)
  • Core Area tab, select
    • Total Core Area (TCA),
    • Core Area Percent of Landscape (CPLAND),
    • Number of Disjunct Core Areas (NDCA),
  • Aggregation Tab, select
    • Number of Patches (NP)
  • Landscape metrics

  • Area - Edge tab, select
    • Total Edge (TE),
  • Aggregation tab:
    • Number of Patches (NP),
    • Patch Density (PD),
  • Diversity tab:
    • Shannon's Diversity Index (SHDI),
    • Shannon's Evenness Index (SHEI)
You should have now selected the 14 different Class and Landscape metrics from their respective windows. The names of each metric (presented in the .Class and .Land files) are bolded above.

Before producing the results, make sure that you have selected the correct input file (and FCD files) in the layers list under File Management or Input Layers.

Run Fragstats.

Using Excel you can take the output files from Fragstats (open the *.class and *.land files as comma-delimited text files) and produce a number of plots and tables. You must label the land uses using the appropriate CLUMP descriptors. You can then compare the results of your analyses and see how the landscape around Edmonton has changed over time.

You should ignore any results associated with those classes that have fewer than 50 cells.

Step 5: Creating a Transition Matrix

You will now create a transition matrix that shows how the land uses in 1966 changed over time (i.e., what uses did they become in 1976?). In order to do this we can use the 'combine' tool [ArcToolbox / Spatial Analyst Tools / Local / Combine]. The result of this operation will be a raster that contains the matches between the two input GRID rasters (that is, the attribute table shows you what a cell was classified as in 1966 and what it was classified as in 1976) (an illustration of what combine does--taken from the ESRI Help file for Combine--where InRas1 and InRas2 would correspond to your two land use rasters). Name the output combine.

IMPORTANT NOTE: Do not store the results of the combine operation in a Geodatabase. If you do the attribute table will not contain the two 'extra' columns that contain the links to the original raster files (the join fields used below).

Before completing the next step and exporting the combine table, however, we should add (JOIN) the actual USE codes (and then the actual land use names) to the results.

  1. Select the combined raster, and select Joins and Relates -- Join.
  2. You will be joining a table--select the field associated with the 1966 raster as the join field (the field name should match the name of your 1966 100 m resolution GRID raster).
  3. Select the attribute table from the 1966 raster, and select VALUE as the join field. Click on Okay. Look at the attribute table of the combined raster to ensure that the join worked properly.
  4. Repeat the join process, but this time select the 1976 column in the combine attribute table and, in the 1976 raster, Value as the join field. Check to ensure that the second join worked properly.

You can perform a second set of joins which will enable you to bring in the actual land use names to the combine attribute table. The simplest way to achieve this is to:

  1. Make a copy of legend.txt (call it legend2.txt).
  2. Add both legend.txt and legend2.txt to your Table of Contents. Open the files to ensure that they were read in properly (you should see two columns).
  3. Right-mouse click on the layer combine, and select Joins and relates -- Join
  4. Select the Ed66 USE column from the combine table (this is one of the joined fields from the first set of joins you performed) as the field the join will be based on.
  5. Select the first legend.txt table, and select the first column (ID or CODE) as the field to base the join on. Validate the join (you may see a number of warnings that you can ignore), and then click on OK.
  6. Check the attribute table--you should see a set of new fields, one of which contains the land use names associated with the CLUMP land use codes for the 1966 records.
  7. Again, right-mouse click on combine, and select Joins and relates .-- Join
  8. Select the ED76 USE column as the field the join will be based on.
  9. Select the second legend table (legend2.txt), and select the first column as the field to base the join on. Validate the join, and then click on OK.

In order to make a transition matrix you need to export the attribute table as a DBF (open the attribute table of the combined result and Select Export and the file type DBF under Table Options), and then open that DBF file in Excel. Ensure that the dbf is being exported to C:\temp\Lab2.

Import the dbf file into Excel (you'll need to set the file type to *.* in order to select the DBF file). You should tidy up the file by removing extraneous columns. To create the transition matrix you need to create a Pivot Table (Microsoft's description). Highlight the three columns you'll need to summarize [Count, showing the number of cells associated with each pair of land use codes, and the two columns that contain the land use names], and then click on Insert -- Pivot Table. For the column labels select the 1976 raster values, for the row labels select the 1966 raster values, and select Count as the  Σ (Sum of) field. The default display may be to just show a series of 1's in the table. If so, you need to change the default to show the sum (which would represent the number of cells that were in land use X in 1966 that become land use X (or Y or Z....) in 1976. In the Pivot table, click on the down-arrow in the  Σ (Sum of) field and select Value Field Settings.... and select Sum as the operation.

You should use the filter capabilities of the Pivot Table Field dialog (see below) to remove the unmapped areas (rows and columns), as well as the Unproductive landsand areas (rows and columns).

You table should look like this, if the four sets off joins worked out correctly and you created the pivot table correctly (if the numbers don't look similar, it suggests that something was performed incorrectly, in either the FCD tables or in the joins):

Once the pivot table is created, we need to convert the raw numbers into percentages. You should also delete the rows/columns associated with those land uses with fewer than 50 cells across both years. (Note that the land use entries are in alphabetical order.)

To make the calculation of the %'ages easier, you should copy the entire pivot table and then paste as 'values' to a new worksheet. I will show you in class how to easily calculate percentages for each of the cells. You should include this final (%) table, and a discussion of what it shows, in your report. (A question to ponder: What percentage values to calculate? That is, you could calculate the percentages based on the row totals [showing how a land use in 1966 changed over time], based on the column totals [showing where a land use in 1976 came from], or based on the sum total. We will talk about this in class.)

Step 6: To be handed in

A 3-4 page report (excluding the tables and figures) on the results of your analyses. Use tables / graphs to demonstrate the changes that you observed in the landscape metrics as a result of the change in the land use around the area of Edmonton between 1966 and 1976. In your report you must not only present the results but also briefly explain what each metric means (the explanations could be included in an Appendix). Don't forget to include the units of the metrics in your tables and figures, if appropriate.

The report should be written from the perspective of a consultant hired by the city council to examine the changes in the land use around the area of Edmonton, AB (therefore, include a cover page [report title, your name, the date] and an Executive Summary [a short paragraph] as the second page). Your report should include maps showing the land uses in the two years and blow-ups of an area that highlights the changes you are describing in your report (there should be two zoomed-in area maps, one for each year). Ensure that you use a consistent colour scheme for all of your land use maps (i.e., a land use on the two maps should have the same colour). Two maps should show the entire study area, one for each time period (can be produced using the vector maps [import the legend to ensure that they correspond]). Here is an explanation of how to create a map with two zoomed-in raster maps as well as an inset map highlighting where the zoomed-in maps are located relative to the entire area.

The results of this lab will be due in two weeks--Friday, Jan 26th, at the beginning of the lab. You should include tables showing the Fragstats statistics for the two maps (combining the landscape metric outputs into one table), the transition matrix table, and several graphs highlighting some of the interesting statistics that you discuss in your report.

Something that might be helpful--an example lab write-up from an earlier class (here), and an example of an inset map (although you aren't asked to look at the change in resolution in this year's lab) here.

Ritters et al. (PDF) explored the relations among 55 of the landscape metrics provided by FRAGSTAT and found that there are very high correlations among many of them (in fact, those 55 metrics statistically only represented 6 different factors). [Riitters et al., 1995. A factor analysis of landscape pattern and structure metrics. Landscape Ecology 10:23-39.]

Two other papers of interest:

Hansen, J. A. G. 1984. Canadian small settlements and the uptake of agricultural land, 1966–1976. Social Indicators Research 15(1): 61-84. (Link)

Muller, M. R. and J. Middleton. 1994. A Markov model of land-use change dynamics in the Niagara Region, Ontario, Canada. Landscape Ecology 9(2): 151-157. PDF