Professional Documents
Culture Documents
Patch Analyst User's Manual: NWST Technical Manual TM-002
Patch Analyst User's Manual: NWST Technical Manual TM-002
by
Philip C. Elkie
Robert S. Rempel
Angus P. Carr
ISBN 0-7778-8295-7
Elkie,P., R. Rempel and A. Carr. 1999. Patch Analyst User’s Manual. Ont. Min.
Natur. Resour. Northwest Sci. & Technol. Thunder Bay, Ont. TM–002. 16 pp +
Append.
Acknowledgements and Credits
Patch Analyst was developed by Rob Rempel, Angus Carr and Phil Elkie. Angus Carr
was the lead programmer. Funding and support for the project was provided by the
Sustainable Forest Management Network (Network of Centres of Excellence) and the
Ontatio Ministry of Natural Resources (Centre for Northern Forest Ecosystem
Research). Thanks to Celine Gilbert and Annalee McColm for layout and design.
Appendices .............................................................................................................. 13
I Patch Analyst Statistic Summary .................................................................. 13
II Glossary ........................................................................................................ 14
III Dissolve Shape File AML ............................................................................. 20
IV Frequently Asked Questions ........................................................................ 21
Introduction
Patch Analyst consists of several scripts written in Avenue and C code. Collectively
these scripts make up the Patch Analyst extension. Patch Analyst requires ArcView (3.x
or higher) and will run on Windows 95, 98 or NT operating systems. Two versions of
Patch Analyst are available; i) vector only version and ii) vector and grid version. The
latter uses the Fragstats Spatial Pattern Analysis program (McGarigal and Marks, 1994)
and requires Arcviews Spatial Analyst extension. A modified version of Fragstats is
packaged and distributed in the Patch Analyst installation files. The Patch Analyst
extension calculates spatial statistics on both polygon files (e.g., shape files) and raster
files (e.g., Arc grids). Generic image files (e.g., Erdas filename.gis, JPEG filename.jpg,
etc.) are similar to grid files and can be imported into ArcView and converted to grid
files for analysis in the Patch Analyst. Patch Analyst can be downloaded from http://
flash.lakeheadu.ca/~rrempel/patch/.
Throughout this manual, reference is made to Fragstats Spatial Pattern Analysis
program (McGarigal and Marks, 1994). The manual for Fragstats can be downloaded
from, ftp://ftp.fsl.orst.edu/pub/fragstats.2.0/. The frag.zip file contains four postscript
files (*.ps): Frag.ps (main body text), FragA.ps (Appendix A), FragB.ps (Appendix B)
and FragC.ps (Appendix C). Patch Analyst uses a modified version of Fragstats, which
is included in the patch analyst distribution package.
Installation
The Patch Analyst extension and other necessary scripts are contained in the zip
archive file named patch.zip. Within the zipped file there are several files that need to
be installed. Installation includes unzipping the patch.zip file into a directory of your
choice. Once the files have been unzipped, double click on the install.apr file. This will
copy the Patch Analyst extension into the “C:\ESRI\AV_GIS30\ARCVIEW\EXT32”
directory. If you are using the vector and grid version Fragstats.exe and Trimgrid.exe
will also be copied into the “EXT32” directory. The install routine will also copy parts
of the Dialogue Designer extension, if not already there, into the ArcView directory
structure. An alternative method of installation is a manual installation, i.e., unzip the
bin, lib, ext.zip files to their respective ArcView directories. The respective ArcView
directories include:
• C:\ESRI\AV_GIS30\ARCVIEW\BIN32 for bin.zip
• C:\ESRI\AV_GIS30\ARCVIEW\LIB32 for lib.zip
• C:\ESRI\AV_GIS30\ARCVIEW\EXT32 for ext.zip
Either method is valid and will install the Patch Analyst extension properly. Once
the extension is installed, start ArcView, open a view, choose Extensions from the
Views file menu, and ensure that the Patch Analyst extension is enabled. The Patch
menu is now available and you are ready to begin using the Patch Analyst.
Click on Patch to activate the Patch Analyst menu. The menu consists of seven
options: Add Area/Perimeter, Dissolve, Create Core Areas, Set MPI Threshold, Set
CWED Weights, Set Core Buffer Distance and Spatial Statistics. An About Patch
Analyst information box lists the Patch Analyst extension credits.
Add Area/Perimeter
The Add Area/Perimeter feature adds two fields (columns) to the shapes attribute
table, if not already present. The first field is an Area field that represents, in map units,
the corresponding shape areas. The second field is a Perimeter field that represents, in
map units, the corresponding shape perimeters. If either of the fields already exist they
will not be overwritten. To update fields with new values existing fields must be
deleted first.
As with most ArcView features, and for most features in the Patch Analyst, the
requested action will be performed on the theme or themes that have been selected.
This does not mean the themes have to be displayed within the view, just that the theme
must be selected. For example, in the ‘Moose Young Old’ View legend window below,
the lower theme (Moose Habitat Map) is selected and the top theme (Moose Habitat
Map Dissolved...) is not selected. The selected theme(s) are “embossed”in the views
table of contents. Several themes can be selected at one time. Patch Analyst also
follows ArcView protocol in that the selected action is performed on the entire theme if
no records are selected. If a set of records are selected, the action will be restricted to
that set.
To dissolve polygons in a shape file choose Dissolve from the main Patch pull-down
menu, select the field that you want to dissolve the polygons by, and click on OK. A
new theme with the dissolved polygons will be added to the view. The new theme is
placed in the project working directory.
A 25 metres
25
metres
Core Areas
Create Core Areas works the same for both shape and grid themes. A core area is
the interior area of a landscape patch and is defined by a core area buffer distance. The
example below shows two core areas (black cells) from a grid file. This grid consists
of 144 pixels, each 25 metres by 25 metres. The two core areas were created by
choosing a core area buffer distance of 25 metres.
Core Areas
In the case of grid files you may be warned that the cells are not square and the ‘X’
dimension is going to be used. Grids can be made up of pixels that are either square or
rectangular. Buffer in grids uses a count of pixels, so grids that have rectangular cells
will not always be buffered the same distance in both directions. In either case Patch
Analyst will use the ‘X’ dimension in the buffer distance algorithm when creating core
area themes.
Detatching multiple cores is a routine that allows the user to treat several core areas
that are derived from the same patch as one core area and vice-versa. If Detached
multiple cores is selected the feature attribute table associated with the core area theme
will include a record (row) for each core area polygon regardless of what patch it was
derived from. In contrast, if Detach multiple cores is not selected the feature attribute
table will include a row for each original polygon (providing it is large enough to have
core area) that the core area theme was derived from. For instance, in the following
view the active theme consists of four polygons: i) conifer, ii) deciduous, iii) mixed-
wood, and iv) swamp. The conifer polygon has an irregular shape and is the largest
polygon. Whether or not Detach multiple cores is selected, the result is a new theme
with the same core area polygons .
In contrast, if detach multiple cores is unselected, the feature attribute table consists
of four rows, one for each original polygon.
The PatchArea field represents the area of the original patch from which the core
originated. The values in this field will occur twice or more in the table if more than one
detached core area has originated from the same polygon or set of cells. The CoreArea
field is the sum of all the core areas originating from the same polygon. This value can
also occur more than once in the table. The Area field is the area of the individual
disjunct core polygon or cells. When creating core areas from Grid themes the attribute
table will also include Value, Count, Link, OldValue and Perimeter fields.
The method used to create core areas also impacts the calculation of some spatial
statistics. In the example below, core areas were created from a single polygon. The
resulting polygons, regardless of whether Detach multiple cores is selected, is three
discrete core areas (i.e., core area polygon ‘a’, core area polygon ‘b’, and core area
polygon ‘c’). When calculating mean core area if Detach multiple cores is selected the
mean core area will be calculated as: MCA = Sum of area of all core polygons/n, where
n is the number of core area polygons in the landscape. If detach multiple cores is not
selected the mean core area will be calculated as: MCA = Sum of area of all core
polygons/n, where n is the number of polygons from which core area polygons origi-
nated. These differences will be reflected in all core area statistics derived from vector
themes.
Themes
In the Themes menu area (top left), the theme(s) selected from the Views table of
contents will appear. Each theme that is present in the Themes menu can be analyzed;
however, only one theme can be analyzed at a time. Select the theme that you wish to
analyze.
Statistics
General
There are six categories of statistics available in the Patch Analyst: i) area, ii) patch
size and density, iii) edge metrics, iv) shape metrics, v) diversity and interspersion
metrics, and vi) core area metrics. Simply select the statistics to be calculated and
reported in the Spatial Statistics Output Table. Choose Select All to select all the
statistics or choose Select None to clear the selection. Certain statistics are only applica-
ble at the landscape level. Similarly, certain statistics are only applicable on shape
themes. For a listing of statistic applicability and abbreviations refer to Appendix I.
Core Area
Core Area Metrics from the spatial statistics dialogue are only available for grid
themes. When core area statistics are required for vector themes, Create Core Areas
(create a core area theme) from the Patch pull-down menu and then treat the core area
theme as a normal patch theme. Choose the desired statistics (i.e., Mean Patch size, etc.)
from the spatial statistics dialogue and the result will be core area statistics. When
creating core area themes two fields are added to the feature attribute table: i) Core Area
and ii) Patch Area. Therefore be sure to choose the proper field to calculate statistics
when analyzing core area themes (see discussion on core areas).
Batch
The Batch option is available in both the Spatial Statistics and Create Core Area
menus. The Batch option allows the user to automatically create Avenue batch scripts.
To create a batch file, make all the selections necessary to calculate spatial statistics on a
specific theme as outlined above, then click on batch. Next, click on clear all and make
a new selection of statistics, then click on batch again. Continue making selections and
clicking on batch. When all the selections have been made, click on Cancel. Close the
active view and click on Scripts from the Projects table of contents. Highlight the Script
called Batch script and click on Run from the top menu. The batch script will run and
the appropriate Spatial Statistics Output table(s) will be created.
Literature Cited
Environmental Systems Research Institute Inc. 1996. Using ArcView GIS. ESRI
Redlands, CA 350 p.
McGarigal and Marks. 1994. Fragstats: Spatial pattern analysis program for
quantifying landscape structure. Reference manual. For. Sci. Dep. Oregon State
University. Corvallis Oregon 62p.+Append.
Ritters, K.H., R.V. O’Neill, C.T. Hunsaker, J.D. Wickham, D.H. Yankee, S.P. Timmins,
K.B. Jones, and B.L. Jackson. 1995. A factor analysis of landscape pattern and
structure metrics. Landscape Ecology 10(1) 23-29.
Area Metrics
Class Area CA Y Y
Total Landscape Area TLA Y Y
Edge Metrics
Total Edge TE Y Y
Edge Density ED Y Y
Mean Patch Edge MPE Y Y
Contrasted Weighted Edge CWED Y Y
Shape Metrics
Mean Shape Index MSI Y Y
Area Weighted Mean Shape Index AWMSI Y Y
Mean Perimeter-Area Ratio MPAR Y N
Mean Patch Fractal Dimension MPFD Y Y
Area Weighted Mean Patch Fractal Dimension AWMPFD Y Y
Notes
All core area metrics are per disjunct cores.
* applicable only at the landscape level
** core area metrics are directly applicable for grid themes. For vector themes create a core area theme.
Glossary
Hierarchy in Patch Analyst Terminology
Landscape
A landscape includes all patches, polygons, contiguous cells or shapes in a view or
a theme.
Class
A class includes all patches, polygons, contiguous cells or shapes in a theme, a view or
a landscape that have the same value for a given attribute.
Patch
Each individual polygon, contiguous set of cells, or shape is a patch. Each patch has a
seperate record, or row, in the theme attribute table.
Important
In the case of vector themes, for all statistics that report indices representing
areas, the standard reporting is in hectares if metres are selected as the Map Units
and acres if feet are selected as Map Units. Analyses of grids only work in metric
and the resulting area statistics or any statistics that use area will be reported in
hectares. It is important that grid theme properties, especially cell size, are set in
metres. Similarily, statistics that use area (e.g., edge density m/ha) will use the
area of all classified pixels in the grid theme. Therefore, if a landscape includes
classified pixels that should not be used as landscape area (i.e., water), these
values should first be classified as No Data. Note that native maps units both
UTM and Lambert projections is meters. Map values are displayed in the upper
right corner of the view.
Class Area
Sum of areas of all patches belonging to a given class.
Example: Conifer Class Area (CA) = 359047.844+......+65819.984
CA = 69.6626 hectares
If the map units are not specified (i.e., View Properties) and State Area in Hecatres
or Acres has not been selected from the Advanced box in the Spatial Statistics Menu,
then the resulting statistics will be reported in native map units (vector themes only).
In the example; CA = 696626.012 (map units). This is the case for most statistics.
Landscape Area
Sum of areas of all patches in the landscape.
Example: Landscape Area (TLA) = 46872.719 + 359047.844 +... + 62423.574
TLA = 184.11 hectares
3. ArcView 3.1 and ARC/INFO both have a Dissolve function. Are they the same
as the one in Patch Analyst? The ArcView dissolve is different. The dissolve (or
merge) function in the Geoprocessing wizard of ArcView 3.1 removes polygon
boundaries of like-classified polygons, but then merges all records by class in the
attribute table. A dissolve on a 4-class habitat theme would result in an attribute table
with only four records, so patch-specific information is lost. The ARC/INFO dissolve
can be used to create the type of dissolve required by Patch Analyst, and can be much
faster. An example AML is available from the download site. Jeffrey Lane has modified
the AV 3.1 Geoprocessing wizard so it will perform an Arc/Info type dissolve as in
Patch Analyst. Go to the ESRI site to obtain geopwaid.avx.
5. My 7-class landcover data (grid format) was derived from a satellite image,
and the value attribute table has only seven records in it. How do I calculate stats
for individual patches? In ArcView, a raster-based grid file normally has an attribute
table with one record for each raster class value. To create the new theme and table,
simply run Dissolve on the original grid theme. This will activate the grid clumping
procedure and structure the data properly. It is not necessary to run the dissolve on grid
themes before using the Spatial Statistics dialog box, however, because fragstats.exe
performs the “dissolve” internally.
6. How does analysis differ between grids and shapefiles? Grid analyses run much
faster than polygon analyses. Experience has shown that for forest management
applications, differences in results between polygons versus grids are relatively small if
a grid cell size of about 50 metres is used.
7. The computer seems hung? ArcView begins to slow down if processing is done on
themes with more than 5,000 polygons. Dissolve is most affected by this limitation, so
large dissolves may have to be done overnight. Some software developers have figured
ways around this AV limitation, but we did not implement any such “work arounds”.
Alternatively, an ARC/INFO dissolve runs much faster, and working with grids is also
much faster. We have included the dissolve function in Patch Analyst because it may be
the only alternative for some users.
9. I have run the Patch Statistics dialog box, but once it is finished, nothing
happens. The output statistics table does not open automatically. Go to Tables, then
select and open the output statistics table.
10. Units for the patch metrics seem wrong. Set map units in the View properties
dialog box.
11. The Core Areas statistics are greyed out. You must select a Core Areas shape
file theme, or any grid theme to make these statistics active. Use Patch > Create Core
Areas, select your dissolved habitat shapefile, and specify the edge distance. A new
theme will be created and added to your View. All statistics, including the specific core
area statistics, can then be run on the core areas theme. Grid themes are automatically
enabled for core area stats.
12. What does “detach core areas” mean? When creating Core Areas (e.g.,
delineating interior forest), processing of the original stand might result in creation of
more than one separate core area. If “detach” is selected, then these multiple cores
created from the original polygon are treated separately, although information on the
size of the original patch from which it was created is retained in the table. This is
equivalent to “disjunct” core areas in fragstats. Grid theme statistics for core areas
report “disjunct” core area metrics.
13. There is not enough flexibility to calculate ratios, create graphs, and display
my results, or, How do I export tables to Excel? Spatial Analyst captures spatial
information in table format, which can then be subject to traditional statistical analysis,
spreadsheet calculations, and graphing. Go to Tables, File menu, then select Excel
Export. Alternatively, the standard Export...will allow you to create a dBase, ASCII, or
INFO table.
14. The entire landscape is too big an area for my analysis. How do I analyse by
subunits? For many ecological applications, analysis of the entire landscape (e.g.,
Forest Management Unit) is too coarse. Alternatively, create subunits by selecting
Make Hexes from the Habitat menu item, then intersect your habitat theme with the
hexagon theme. Now run spatial statistics on this intersected theme, and select
IDCODE as the analysis class. This is explained in greater detail in the Habitat Analyst
section of the FAQ.
15. Can I automate the proceedure to run multiple analyses, or What is the Batch
button for? The batch button can be used to send analysis requests to a script file,
much the way the paste button allows you to save syntax in an SPSS session. After
selecting options in the Spatial Statistics dialog box (including the advanced dialog,
which allows you to request a DISSOLVE of the shapefile), or the Create Core Areas
dialog box, push the Batch button. Once selections have been made, push the Cancel
button. Now go to the Scripts area, open Batchscript, and you will see the compiled
script file used to run the procedures. This script can of course be edited and
recompilied to further automate your analyses. A single quote marks a commented line.