![]() |
|||||||||||||||||||
|
|
FRAGSTATS: Spatial Pattern Analysis Program for Categorical Maps Frequently Asked Questions |
|
|||||||||||||||||
This page contains answers to frequently asked questions. |
|||||||||||||||||||
|
|||||||||||||||||||
| Q1. We ran some known cases through FRAGSTATS 3.x to gain a better appreciation for the nearest neighbor distances. The documentation says that it is measured edge-to-edge. It appears that what is measured is the centroid-to-centroid distance of the two nearest grid cells. So for example if we have two 30 x 30 m grid cells that are one cell apart, the expected nearest neighbor distance is 30 m. The actual distance reported is 60 m. We have tested this out with multiple patch sizes and I think that the deviation is due simply to the distance from the centroid to the edge of the cell that is closed to the neighboring patch. Is this correct? | |||||||||||||||||||
| This is one of the important differences between the old version of FRAGSTATS (2) and the newer versions of FRAGSTATS (3 and 4). In the newer versions, nearest neighbor distance is calculated from the center of the cell on the patch edge (i.e., centroid of the cell) to the center of the nearest cell in another patch of the same class. So this is cell-centroid to cell-centroid of the two nearest cells. This has the effect of adding a single cell width to all nearest neighbor distances. We implemented this for several reasons. In part, this was necessary to accommodate the new similarity index so that you don't have a zero denominator (i.e., the distance between adjacent patches). In addition, we decided that it makes more sense ecologically than cell edge-to-edge distance, since it better reflects the error associated with the raster data representation. | |||||||||||||||||||
| Q2. Are there any limits to class ID values (i.e., the unique integer value assigned to each distinct class or patch type)? | |||||||||||||||||||
| All classes must have non-zero integer values; that is, zero should not be used as a class value because it is impossible to assign a negative value to zerio to distinguish cells of that class that are outside the landscape boundary. Otherwise, there are no limits to the class values that can be used, although it is logical to use the smallest numbers possible. | |||||||||||||||||||
| Q3. Why are some features (e.g., metrics) inactive in the FRAGSTATS 3.x interface? | |||||||||||||||||||
| FRAGSTATS 3 was always in a state of development. Unfortunately, we created the interface in anticipation of implementing a large number of new features, but did not fully implement or test several features. These features are inactive in the graphical user interface. Please note, that some features will become inactive during the parameterization process based on user selection of certain other features. For example, if you select the moving window analysis option, then "patch metrics" will become inactive in the run parameters dialog box, because patch metrics are not suited for a moving window analysis. | |||||||||||||||||||
| Q4. How do I cite FRAGSTATS for publication? | |||||||||||||||||||
Unfortunately, we can't provide a proper journal or book citation for the current version of FRAGSTATS. Currently, this website is the sole means of "publication" of the software. We suggest the following citation: Version 4: McGarigal, K., SA Cushman, and E Ene. 2012. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical and Continuous Maps. Computer software program produced by the authors at the University of Massachusetts, Amherst. Available at the following web site: http://www.umass.edu/landeco/research/fragstats/fragstats.html Version 3: McGarigal, K., S. A. Cushman, M. C. Neel, and E. Ene. 2002. FRAGSTATS: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors at the University of Massachusetts, Amherst. Available at the following web site: http://www.umass.edu/landeco/research/fragstats/fragstats.html |
|||||||||||||||||||
| Q5. How do I install FRAGSTATS for use with Arc Grids? | |||||||||||||||||||
As noted in the user guidelines under data formats and in the installation instructions on the downloads page, if you wish to use FRAGSTATS with ESRI Arc Grids, you must have a system PATH variable in your environmental settings (Windows NT, 2000, XP, 7) that points to a necessary dll file that comes with Spatial Analyst license. This file is typically found in the Bin32 folder (ArcView) or Bin folder (ArcGIS). This allows you to install and run fragstats from any directory on your hard disk. Alternatively, you can run FRAGSTATS from the Bin32 or Bin folder. Detailed instructions are provided in the Help documentation (User Guidelines--Overview--Data Formats) and on the downloads page. |
|||||||||||||||||||
| Q6. Why is FRAGSTATS unable to allocate sufficient memory? | |||||||||||||||||||
| FRAGSTATS in its current implementation is a 32-bit application and as such it has the 3GB hard ceiling on how much memory it can use. When running FRAGSTATS, if you see the memory allocation going all the way to 3GB or close then that it is reaching the maximum memory available, which may not be enough for very large and complex landscape. FRAGSTATS is a compute-intensive program; its performance is dependent on both processor speed and computer memory (RAM). Ultimately, the ability to process an image is dependent on the availability of sufficient memory (as noted above); the speed of processing that image is dependent on processor speed. Of particular note is the memory constraint. FRAGSTATS loads the input grid into memory and then computes all requested calculations. Thus, you must have sufficient memory to load the grid and then enough leftover for processing and other operating system needs, and stay within the 3GB limit. Memory requirements are affected by grid size, number of patches and number of classes. Of partiuclar importance is the number of patches, which can vary by orders of magnitude from one application to another. To determine whether you have enough memory based solely on grid size, you can use the following formula: #cells*4bytes. Thus, if you have a 256 rows by 256 columns grid, the minimum memory needed is 256 kb (256*256*4/1024 bytes/kb) just to load the grid. However, you also need additional memory that increases with the number of patches and classes, and this can be extremely constraining when working with complex (patchy) images. The solution to this problem if it arises is to work with as much memory as possible up to 3GB, simplify the grids, reduce grid size (e.g., resampling), subdivide the grids into separate sections, etc. A long-term solution is in the works (e.g., port to 64-bit) that should reduce or even eliminate memory constraints. In the meantime, you will have to work around the memory constraints. Note, the memory requirement is especially constraining in the moving window analysis because FRAGSTATS requires enough memory for the input grid plus one output grid, plus enough leftover for other processing needs and system needs. If the moving window analysis is selected, FRAGSTATS checks to see if it can allocate enough memory for three grids (i.e., 1 input grid + 1 output grid + enough leftover to insure performance). In the above example, you would need at least 768 kb of memory to conduct a moving window analysis at a minimum based on grid size, but an unknown amount of additional memory depending on numbers of patches and classes. | |||||||||||||||||||
| Q7. Why does the Windows task manager report that FRAGSTATS 3.x is "not responding"? | |||||||||||||||||||
| During a long FRAGSTATS 3.x run (e.g., a batch file), it may be unclear whether FRAGSTATS is actually running or not. For reasons that can't be explained here, the Status Bar may not report "processing" when in fact the program is running. The surest way to confirm that FRAGSTATS is actually running is to open the Windows Task Manager (for NT-based systems). However, the Application tab will show that Fragstats is "Not Responding". Open the Processes window and check to see if FRAGSTATS is using CPU and memory. If it is, then your O.K., let it continue running. Unfortunately, if you try to return to the FRAGSTATS window while it is still running, the window may be blank. That's O.K. Just wait for the process to end. Note, this issue has been resolved in FRAGSTATS 4.x. | |||||||||||||||||||
| Q8. I can't get FRAGSTATS 3.x to run under Windows XP. It downloads and seems to install with no problems, but when I double click on the icon or select it in my Start menu program list, the hour glass appears for a few seconds and then dissappears, and FRAGSTATS never starts up. | |||||||||||||||||||
| The symptoms you are experiencing are usually generated by the ESRI license manager. The mechanism is simple, when FRAGSTATS starts it looks in the system path for a grid library to load. If one is found, it is loaded and initialized. During the initialization phase there are two possible scenarios. If you have the ArcView companion avgridio.dll, it does a few checks to see if it is part of a legitimate installations and then allows running. If you have ArcGIS, then aigridio.dll calls the license manager to verify legitimacy. In both cases, if the legitimacy is not validated due to a variety of reasons (e.g., dll copy present in a folder that is not part of the installation, misconfigured license manager, or simply all licenses already in use) the library aborts the entire application. Why they do that instead of returning an error is beyond me, but the result is that the user sees an hourglass as part of the loading process and the application is killed before even showing its main window. The solution to the problem depends on which libraries are available on a particular machine. If only ArcView is present, make sure there is only one copy of avgridio.dll and that it is in the bin folder of the installation. If both ArcView and ArcGIS are installed then, ...arcview\bin should be in front of ...arcgis\bin as listed in the system's PATH variable. The first encountered library is always loaded, and the one that came with the standalone ArcView (up to version 3.3) + Spatial Analyst is easier to get going. If you only have ArcGIS and/or ArcINFO Workstation, then recheck the license manager configuration, available licenses (especially for the grid module), and whatever else that can result in denying the right to execute the library, including file system access rights (read, execute) for the user under which Fragstats is trying to run. | |||||||||||||||||||
| Q9. What does the error message "bad parameters internally passed" mean? | |||||||||||||||||||
| Unfortuntately, in version 3.3 this error message is generated in 12 source files for several reasons. The most common reason is an empty (or missing) input or output filename, but also zero rows or zero columns in the input dataset, or no metric selected at any level. In the absence of any additional info (input file type and name, metric selection, extra messages prior or following the one in question...) it is impossible to tell what exactly went wrong. If you get this error message after checking and correcting the above mentioned problems, then please send a detailed message with all relevant information to Kevin McGarigal. | |||||||||||||||||||
| Q10. Why can't I load my ERDAS or IDRISI images? | |||||||||||||||||||
| Unfortunately, version 3.x and 4.1 of FRAGSTATS has not kept pace with changes in the file data formats with ERDAS and IDRISI software since the original release. Consequently, current images from either of these software packages will likely not work with version 3.x. However, the development version of FRAGSTATS (4.1) does include an input option for ERDAS, but not IDRISI, via the GDAL library. As an alternative, you may want to use the tool LANDISVIEW to convert your IDRISI files into ASCII grids for compatibility with FRAGSTATS. | |||||||||||||||||||
| Q11. Problems running under ArcGIS? | |||||||||||||||||||
Several users have reported problems trying to run Fragstats under ArcGIS10.x, when it ran fine under ealier versions. The problem is ESRI, who consistently screws all third party programs with every upgrade. Apparently, they think the world revolves around them and give no consideration to campatibility with other programs. Version 3.4 was a stop-gap release that worked with ArcGIS10.0 (see downloads). However, version 4.1 should be compatible with all versions of ArcGIS 10.0 and earlier and is the current development version of the software. If you are having problems getting FRAGSTATS to open, then run the diagnostic utility available from the downloads page. This will verify that you have a valid Spatial Analyst licence. The most commonly report problems getting FRAGSTATS to run under ArcGIS (version 10.0 or earlier) are as follows:
Unfortunately, thanks to ESRI, FRAGSTATS currently does not work with latest ArcGIS version 10.1. Until we modify FRAGSTATS again to accommodate the upgrade, here is a solution presented by Sue Clark, in her words: "I changed my tool to extract to a .img file and it works great. I had to project my mask files and grids to a projection that used meters as linear units. Below is my routine for extracting grids. # # extractBufRings # Extract grids using a polygon mask # Inputs: # vegGrid - vegetation grid # ext - string containing the extent # outRast - name of the output grid (.img) # mask - the grid mask # def extractBufRings(vegGrid, ext, outRast, mask): # Define a layer file for the small grid made with the buffer ring extent vegLayer = 'vegLayer.lyr' # Get the vegetation for the area of interest via MakeRasterLayer arcpy.MakeRasterLayer_management(vegGrid, vegLayer, "", ext, "") # Extract the vegetation layer to the output raster arcpy.gp.ExtractByMask_sa(vegLayer, mask, outRast) Here is the call to that routine. outRast = gridList[g][1] + outRastName + '.img' extractBufRings(gridList[g][0], extent, outRast, curMaskLyr) Of course the code has some variables that are specific to my application and I’m still using the gp version of the extract by mask tool." |
|||||||||||||||||||
| Q12. What does the following error mean: "Error: Unexpected error encountered: [bad allocation]. Model execution halted." or "Unexpected error encountered while loading ..." | |||||||||||||||||||
In FRAGSTATS 4 this error is reported in a variety of situations: 1)When enough memory cannot be allocated to either load the grid or complete the processing. This happens when the grid is too large given other factors. The solution is either to increase your memory to >2GB or, if this fails, subdivide the landscape into sub-landscapes. 2) When the grid cells are not Absolutely square. This is a hidden problem with ESRI ArcGrids in some cases. Although the grid description will say the cells are square, this can be an artifact of the rounding done for displaying purposes. Sometimes the non-square problem is beyond the first 14 decimal places, and ESRI does not allow you (us) to see more precision, even though it exist internally.
The problem is that the error happens inside a FRAGSTATS call of an ESRI function, and there is nothing we can do except catch the exception and log it. Unfortunately, re-sampling the grid with the same cell size does solve the problem. However, re-sampling the grid with a different cell size does solve the problem. Note, the functions we are using from their library are those that were published and partially documented 10 years ago, because these are the only functions they will allow third party access to. In the meantime they have added many more functions that ArcGIS uses but nobody else can access. There is simply no ESRI documentation for handling situations like the one we're facing now. Thanks alot ESRI. |
|||||||||||||||||||
| Q13. What does the following error mean: ""Cannot_set_access_window" | |||||||||||||||||||
| In FRAGSTATS 4 this error is reported when the path to input ArcGid contains spaces. The complete path to the folder containing the input grid cannot contain spaces. This only applies to ESRI ArcGrids. | |||||||||||||||||||
| Q14. FRAGSTATS saves the header information but not the metric results to the output files | |||||||||||||||||||
| In FRAGSTATS 4, if the path or directory to the input grid(s) contains Greek letters, or anything but English letters and/or numbers, the program will run successfully and report results to the results window, but it will only save the header information and not the metric results to the output files. The solution of course is not to include anything but English characters in the path name. | |||||||||||||||||||
|
|
|||||||||||||||||||
|
For more information, please contact: |
|||||||||||||||||||
| Copyright 2000 University of Massachusetts Amherst, Massachusetts, 01003. (413) 545-0111. This is an official page of the University of Massachusetts Amherst campus. All material in this website is made available according to the Fair Use Statute of the U.S. Copyright Act | |||||||||||||||||||