Print

Appendix C: Advice on Developing Marxan Input Files and Displaying Results in GIS

This wiki is not the official version of this document, but is an effort to facilitate the further improvement of the manual by the community of Marxan users. Click here fthe official Marxan User Manual PDF. If you would like to register as an editor of the manual contact us at . In your email please outline your Marxan experience and provide us with your contact information.
To recommend and discuss changes to the Manual, go to the Marxan User Wiki Discussion Site.


There are many ways of developing the files necessary for running Marxan. The choice of method will depend on your skills, available software and personal preference. Some software is free and others relatively expensive. Our aim here is to point you towards useful tools and resources rather than provide step by step advice. Most of the advice is based on ESRI Arc View 3 and ArcGIS 8 and 9, and the user friendly interfaces for Marxan; Conservation Land-use Zoning (CLUZ) and PANDA.

C-1 Resources
C-1.1 Software
You will need at minimum a spreadsheet or textpad type program to develop, read and manipulate the required input text files. Windows operating systems contains the notepad text editor. There are many free text editors available on the internet that can be substituted. Spreadsheet programs such as Microsoft excel and OpenOffice? (a free open source alternative) are useful for applying formulas and easy manipulation of data. Another useful program for manipulating input files is the C-Plan? table editor, which is freely available when C-Plan? is downloaded from http://www.uq.edu.au/~uqmwatts/cplan.html.

For spatial analysis Geographic Information Systems (GIS) software is required. The most popular are the ESRI family of software (http://www.esri.com). This includes ArcView? 3 and ArcGIS 8 or 9. Due to the popularity of these programs there are many extensions that can be downloaded to expand their functionality and automate functions for more user friendly manipulation of data. We recommend a few as we describe methods of creating the Marxan input files below. Note that there are many excellent free open source GIS software packages available for download such as MapWindow? (http://www.mapwindow.com), Quantum GIS (http://www.qgis.org), and GRASS (http://grass.itc.it/). Another free alternative is DIVA (http://www.diva-gis.org/). Currently they do not have the same functionality as the ESRI ones, but various programmers are working on scripts to expand their functionality including the tools necessary for developing Marxan input files. Later versions of this manual will include updates on this situation.

Also, there are some free software tools that simplify running Marxan and creating the Marxan input files. Three of these are: CLUZ that operates through ArcView? 3 (http://www.mosaic-conservation.org/cluz/index.html), C-Plan? that also operates through ArcView? 3 (http://www.uq.edu.au/~uqmwatts/cplan.html) and PANDA that requires ArcGIS 8 and 9 (http://www.mappamondogis.it/panda.htm). There are future plans for similar software to work through free GIS software. The Nature Conservancy has developed "Protected Area GAP Decision-Support? System for ArcGIS 9.1" that facilitates Marxan analysis, available from ftp://cerp:cerppassword@ftp.tnc.org/CDSS/Protected_Area_Gap_DSS.zip Lastly there is Vista that operates through ArcGIS 9 that is not free, for free trial see http://www.natureserve.org/prodServices/vista/overview.jsp.

C-1.2 Courses and tutorials
The University of Queensland offers courses on the use of Marxan and systematic conservation planning. The details can be found at the Marxan website http://www.ecology.uq.edu.au/index.html?page=27710 also see http://www.aeda.edu.au/events. If you are not able to attend, the course materials, including the tutorials, are available to download. This includes step by step advice on developing input files and running Marxan. There are also often a short-course on conservation planning and software such as Marxan as part of the Society for Conservation Biology annual conference http://www.conbio.org/. For information on past short-courses (including presentations), software demonstrations (including downloadable data and instructions on using Marxan) see http://www.aeda.edu.au/events. A useful tutorial on using the CLUZ interface for Marxan that can be downloaded at http://www.mosaic-conservation.org/cluz/tutorial.html and a step-by-step guide for running conservation assessments using CLUZ and Marxan is available from http://www.mosaic-conservation.org/cluz/steps.html.

C-2 Creating the planning unit file

An example of the Planning Unit File.

When producing the input files, it is first necessary to have a spatial layer of planning units. Planning units are not, however, constrained to being square, any division is acceptable. Other examples include hexagons, cadastral parcels and hydrological units. Some thought should be put into determining the most appropriate type and size of planning unit for each specific application see the references section for advice. To create a planning unit theme that represents entities such as cadastral boundaries or watersheds just use an existing spatial layer that provides the boundaries of these polygons, otherwise it will be necessary to produce your own layer.

For ArcView? 3 users:
  1. Either use existing planning units if available or develop new ones. If developing new ones a useful extension is http://arcscripts.esri.com/details.asp?dbid=14329. This extension generates an array of repeating shapes over a user-specified area. These shapes can be hexagons, squares, triangles, circles or points, and they can be generated with any directional orientation. Alternatively ET GeoWizards? has a function to create grids www.ian-ko.com/
  2. WARNING: Plugin disabled TAG!1Use your existing protected areas theme and add a field called "ID" to the protected areas theme table. Give each protected area a unique identifier number. Either:
    • Use the “update polygon theme” in Xtools http://arcscripts.esri.com/details.asp?dbid=11526
    • Use the “erase” function in ET geowizards www.ian-ko.com/ to erase planning units where protected areas are located. Then “union” the protected areas layer with the erased planning units.
    • Use ArcView's “union” option in the Geoprocessing Wizard to combine the planning units and the protected areas into a new theme. The new theme will divide each protected area into a number of whole regular polygons and some fragments. Use the “dissolve” option in the Geoprocessing Wizard to merge all these pieces into one polygon for each protected area. In the dialog box, for the Select an attribute to dissolve input box choose the "ID" field.
  3. Ensure that each planning unit has a unique identifier that can be used for the “id” field.
  4. Add a field “status” and use the protected areas layer to “select by theme” planning units that are protected. After selecting already protected planning units, in the theme table add “2” in the “status” field for these planning units. This process can be repeated for planning units if you want particular areas to be excluded. In the theme table add “3” in the “status” field.
  5. To calculate the cost field you need at a minimum a spatial cost surface.
  6. The next step is to calculate the cost of each planning unit.
    • Set view properties. The analysis extent should be set to your planning unit layer, and the analysis grid size should be set small enough to allow accurate results whilst being large enough to be tractable to run (eg. 10m or 100m depending on regions size)
    • If it is a vector layer convert to a rasterWARNING: Plugin disabled TAG!2
    • Use ‘summarise zones’ with the cost layer and planning units. Join the output table with the planning unit layer. Or, zonal statisticsWARNING: Plugin disabled TAG!3 can be applied using various user-created extensions such as “Mila Grid Utilities” http://www.mila.ucl.ac.be/logistique/sig/sig-tools/milagrid/index.html
  7. To create the X and Y fields, Xtool WARNING: Plugin disabled TAG!4 http://arcscripts.esri.com/details.asp?dbid=14329 has a function to do this.
  8. Your theme table should contain all necessary fields to create the Marxan Planning Unit File. Export table and open in notepad or a spreadsheet program to clean-up, check and save as a text file with the “.dat” extension.

CLUZ users will need to follow steps 1-2 shown above to create the planning unit theme but the remaining steps can be undertaken using the “Create unit theme from shapefile”, “Calculate % of unit that falls within PAs” and “Create unit.dat” functions.

For ArcMap? 8 and 9 users:
  1. Either use existing planning units if available or develop new ones. If developing new ones a useful extension for creating a grid is ET geowizards http://www.ian-ko.com/
  2. WARNING: Plugin disabled TAG!1Use your existing protected areas theme and add a field called "ID" to the protected areas theme table. Give each protected area a unique identifier number. Either:
    • Use the “update polygon layer” function in Xtools ProWARNING: Plugin disabled TAG!4 http://www.xtoolspro.com/
    • Use the “erase” function in ET geowizards http://www.ian-ko.com/ to erase planning units where protected areas are located then “union” the protected areas layer with the erased planning units.
    • Use ArcMap? “union” function to combine the planning units and the protected areas into a new theme. The new theme will divide each protected area into a number of whole regular polygons and some fragments. Use the “dissolve” function to merge all these pieces into one polygon for each protected area. Dissolve based on the "ID" field.
  3. Ensure that each planning unit has a unique identifier that can be used for the “id” field.
  4. Add a field “status” to the planning unit theme. Use the protected areas layer to “select by location” planning units that are protected. In the theme table add “2” in the “status” field for these planning units. This process can be repeated for planning units that want to be excluded. In the theme table add “3” in the “status” field.
  5. To calculate the cost field you need at minimum a spatial cost surface.
    • If it is a vector layer convert to a rasterWARNING: Plugin disabled TAG!2
    • Use “zonal statistics”WARNING: Plugin disabled TAG!3 with the cost layer and planning units. Join the output table to the planning unit layer.
  6. To create the X and Y fields, Xtool ProWARNING: Plugin disabled TAG!4 http://www.xtoolspro.com/ has a function to do this. Otherwise i) convert feature to points, ii) add XY coordinates and iii) join back.
  7. Your theme table should contain all necessary fields to create the Marxan Planning Unit File. Export table and open in notepad or a spreadsheet program to clean-up, check and save as a text file with the “.dat” extension.


WARNING: Plugin disabled TAG!1Some people do not include protected areas as whole planning units but classify their planning units as protected or not based on the proportion of a planning unit already conserved.
WARNING: Plugin disabled TAG!2Note that Spatial Analyst extension is required for ArcMap? and ArcView? 3 to create and use raster files.
WARNING: Plugin disabled TAG!3There is often a computational limit to using zonal statistics.
WARNING: Plugin disabled TAG!4These function are free to use, others are not.

C-3 Creating the planning unit versus conservation feature file
There are two formats of the Planning Unit versus Conservation Feature File: tabular and relational.


The relational format is necessary for newer versions of Marxan and allows for faster calculations. If using relational, we recommend first creating a tabular version of the file then converting this file to relational using either the program that is included when you download newer versions of Marxan from:
http://www.ecology.uq.edu.au/index.html?page=27710 or the C-Plan? Table Editor: http://www.uq.edu.au/~uqmwatts/cplan.html which allows files to be imported (.csv or .dbf so they may need to be converted to these) then exported to relational using the “save as Marxan file” command.

These steps will need to be continually applied to each of the conservation features used in the analysis.

For ArcView? 3 Users
For CLUZ users there are functions that create a new planning unit v conservation feature table, import data from existing tables or shapefiles and export these data in the correct Marxan format, otherwise:
  1. Make a copy of the planning units layer and delete all fields except ID. You now want to tabulate any features you have.
  2. Set view properties. The analysis extent should be set to your planning unit layer, and the analysis grid size should be set small enough to allow accurate results whilst being large enough to be tractable to run (eg. 10m or 100m depending on regions size)
  3. If it is a vector layer convert to a raster.
  4. Use the “tabulate areas” function to calculate the amount of each feature in each planning unit. Join the table that is produced to the copied planning units layer. Repeat this step for all features.
  5. Once this has been repeated for all features. Open attribute table and export the table. Open in notepad or a spreadsheet program to check. For example make sure the heading includes “pu” and note that the name of each feature needs to be a number. Save as a text file with the “.dat” extension.

For ArcMap? users
  1. Make a copy of the planning units layer and delete all fields except ID. You need to tabulate any features you have. Repeat the following steps for all features.
  2. Use the “tabulate areas” function to calculate the amount of each feature in each planning unit. Join the table that is produced to the copied planning units layer. Repeat this step for all features.
  3. Once this has been repeated for all features. Open attribute table and export the table. Open in notepad or a spreadsheet program to check. For example, make sure the heading includes “pu” and note that the name of each feature needs to be a number. Save as a text file with the “.dat” extension.
  4. Refer to the PANDA user manual for details on using the Planning Unit File with PANDA.

C-4 Conservation feature file

An example of the Conservation Feature File (spec.dat) used in Marxan.

The Conservation Feature File contains information about each feature being considered within the analysis. Most of the data required for developing this file will be knowledge about the natural history of each feature, threatening processes and the spatial requirements for its persistence. This will probably involve an extensive search of the literature and expert input. The file will most likely be developed in a spreadsheet program to enable formulas to be applied and saved as a text file with the “.dat” extension.

If similar targets are going to be set across particular features we recommend the use of a Block Definition File (See Section 3.3.2).

For CLUZ users there are several functions that create a new target table, allow the data to be inputted and export these data in the correct Marxan format. For PANDA users refer to the PANDA user manual.


C-5 Creating the Boundary Length File

An example of the Boundary Length File (bound.dat)

The Marxan Boundary Length File contains the costs of the boundaries between planning units. The following two extensions produce a Marxan Boundary Length File in which the cost is the length of the shared boundary between adjacent planning units (the most common choice), however, we direct more advanced users to the MGPH for other techniques. Note that the planning unit layer should be topologically correct. That is, there must be no gaps or overlaps between neighboring planning units and no dangling arcs. Topology tools within ArcGIS or various scripts can be used to inspect and correct these errors. It is often possible to create a Boundary Length File from a planning unit layer that has topological errors. However, the boundary data will include the errors and cause Marxan to produce strange results (e.g. by making neighbouring planning units appear to not be neighbours).

For ArcView? 3 users an extension is available from http://www.mosaic-conservation.org/gis/boundary.html. This function is also included in the CLUZ extension.

For ArcGIS the JNCC ArcGIS extensions are available from http://www.uq.edu.au/marxan/index.html?page=83126

PANDA also provides a tool to create the Boundary Length File under the “Marxan Advanced” menu.

C-6 Linking output files with ArcGIS
It is very useful to display the output files from Marxan for visual interpretation of results, publishing and for decision support. There are user friendly interfaces that allow analysis and instant display of results in GIS. These includes CLUZ, PANDA and C-Plan?. There are also plans for other new interfaces that will operate through open-source GIS software. If you are not using any of these interfaces you can manually link the output files to both ArcView? 3 and ArcGIS 8 and 9 by:

  1. Opening the files in a spreadsheet program, auto-fit the columns and save as a .dbf or .txt file.
  2. Open in GIS and join the table with the spatial layer of your planning units.
  3. It is often useful to open copies of your planning unit file so that you can view and compare different results.



Menu [toggle]