You are on page 1of 37

Introduction to Marxan

Course Manual
Day 1

Matthew Watts, Rebecca Runting, Jutta Beher, Viv Tulloch, Alistair


Becker, Virgilio Hermoso, Azusa Makino

m.watts@uq.edu.au

Funding for the development of this course was provided by the NERP Environmental
Decisions Hub, ARC Centre of Excellence for Environmental Decisions, Centre for
Biodiversity & Conservation Science, University of Queensland

Table of Contents
DAY 1 ................................................................................................................................. 2
WHAT ARE WE DOING? ............................................................................................................. 2
SOFTWARE USED IN THE COURSE ............................................................................................. 2
GETTING STARTED .................................................................................................................... 3
RESERVE DESIGN ACTIVITY..................................................................................................... 4
HUMAN VS COMPUTER: COMPARING YOUR DESIGN WITH MARXAN SOLUTIONS ........................... 5
DATA USED IN EXERCISE .............................................................................................................. 5
CASE STUDY PROFILE ................................................................................................................. 7
STEP 1: CREATING PLANNING UNITS ......................................................................................... 9
CREATING DATA INPUT FILES .................................................................................................... 9
STEP 2: CREATING THE PLANNING UNIT FILE (PU.DAT) ............................................................ 13
STEP 3: CREATING THE SPECIES FILE (SPEC.DAT)AND THE PLANNING UNIT VERSUS
SPECIES MATRIX (PUVSP.DAT) ................................................................................................ 20
STEP 4: CREATING THE BOUNDARY LENGTH FILE (BOUND.DAT) ........................................ 27
STEP 5: ESTABLISH A STANDARD FILE STRUCTURE FOR THE MARXAN DATABASE ........... 29
STEP 6: CREATING THE INPUT PARAMETER FILE ................................................................. 31
STEP 7: RUNNING MARXAN FOR THE FIRST TIME................................................................. 34
STEP 8: DISPLAYING MARXAN SPATIAL OUTPUT IN QUANTUM GIS ................................... 35

Day 1
What are we doing?
On day 1 of this course, we will complete a simple reserve design exercise to
introduce the mathematical concepts used by Marxan, and then construct a Marxan
dataset from GIS data that is provided. On day 2, we'll run the Marxan dataset to
produce some reserve network configurations, test some alternative input parameters,
and display the reserve network configurations on a map. On day 2, we'll also use RProject to perform a cluster analysis on the reserve network configurations we've
generated to classify the dissimilarity of those reserve network configurations.

Software used in the course


We will use a range of freely available software packages: Quantum GIS, Qmarxan,
Zonae Cogito, Marxan, and R-Project. We also use the commercial software Excel.
The operating system is Windows 7.
Excel
We'll use Excel to complete a simple reserve design activity to introduce you to the
mathematics used by Marxan.
Quantum GIS and Qmarxan
We'll use the Qmarxan plugin for Quantum GIS to construct a Marxan dataset from
the GIS data that is provided. Quantum GIS is available from www.qgis.org and the
Qmarxan plugin can be installed through the Quantum GIS graphical user interface.
Instructions for installing the Qmarxan plugin are included in the text.
Zonae Cogito and Marxan
We use the Zonae Cogito graphical user interface to run Marxan, edit Marxan
parameters, and display Marxan results on a map. Zonae Cogito and Marxan are
freely available from www.uq.edu.au/marxan and instructions on installing Zonae
Cogito are available from the website.
R-Project
We use R-Project to perform cluster analysis of Marxan solutions using a number of
R-Project packages. R-Project is available from www.r-project.org and the R-Project
packages can be installed through the R-Project graphical user interface. Instructions
for installing the required packages are included in the text.

Acknowledgment
The November 2011 day 1 course handbook is also included with the course
materials. It illustrates these steps with ArcGIS 10 and Excel and was written by Matt
Watts, Carissa Klein, Lindsay Kircher, Dan Segan, and Eddie Game. We base our
document on their original material, except with revisions for the use of Quantum GIS
and Qmarxan in place of ArcGIS 10 and Excel. Only UQ staff and students are
authorised to use the ArcGIS software in the UQ lab due to licensing restrictions
imposed by the software vendor.

Getting started
Login to the computer
v Login to the computer using your access credentials.
Load the course materials
Here, well copy the course materials from the Internet to our computer so that we can
use those materials to complete the exercises and activities.
Using a web browser, download this file:
http://marxan.net/courses/MarxanIntroCourse.zip
When you have downloaded the file, unzip it like this:
- Right mouse click on the MarxanIntroCourse compressed folder,
- Click on Extract All,
- Extract the folder to C:\.
You will now have a folder on your computer called C:\MarxanIntroCourse that
contains the course materials. Note: We refer to folder "C:\MarxanIntroCourse" in
this document. If you install it somewhere else, substitute the folder name you have
used in place of C:\MarxanIntroCourse where C:\MarxanIntroCourse is
referenced in this document.
Note: There are many ways to create and view Marxan and C-Plan files. For the
purpose of this class, we present just one method using Quantum GIS and Qmarxan.
This manual is meant to be used in an introduction to Marxan course and not as a
stand-alone document. In addition, this manual only covers some of the basic
functionalities of Marxan. Additional methods are outlined in the Marxan manual
(http://www.uq.edu.au/marxan ).


Reserve Design Activity
In this activity, you will design a reserve network (by hand) that reaches your
conservation targets in a cost effective manner. This is a theoretical dataset,
comprised of 100 square planning units of 100 hectares each, with 3 species
distributed across the planning units (see Figure 2).
The purpose of this activity is to introduce you to the mathematics that Marxan uses
to choose which planning units to include in a reserve network configuration.
Your objective is to represent 20% of the total habitat area for species 1, 2, and 3
only, in the study region (see Table 1) at least cost (refer to spreadsheet and Figures 1
and 2).
Species total area
target area
1
1337
267.4
2
1256
251.2
3
1215
243
Table 1. Species number, area occupied, and target area
v Navigate to the folder "C:\MarxanIntroCourse\Reserve_design_exercise" and
open the excel file titled exercise_spreadsheet_ver2.xls
This spreadsheet has information for each planning unit (100 planning units, each
with a separate row and a Planning Unit Identification Number PUID). This
information includes the cost of the planning unit and how much of each of the three
species is contained in that planning unit. You can select a planning unit by changing
the value in the SELECTED field to 1. To see information about the cost of each
planning unit, and the habitat occupied by each species in each planning unit, see
Figures 1 and 2 (next page).
When you select a planning unit, summary information is updated to provide you
feedback on the selections. SUM COST (the cost of the reserve system selected, and
the amount needed to meet the targets for the reserve system (TARGET GAP) is
updated:
SUM COST
TARGET GAP

0
761.6

You can also track the individual species targets as you change the planning units
selected:
spname total target amount held target gap target met
1
1337 267.4 0
267.4
NO
2
1256 251.2 0
251.2
NO
3
1215 243
0
243
NO

v Use the spreadsheet to find a reserve system that meets all of your
conservation targets in a cost effective (and clumped) way. When you have
found a good reserve system, write the value of sum cost on the board.
v Now find a good reserve system that is more spatially compact and write the
value of sum cost on the board.

Human vs Computer: Comparing your design with Marxan


solutions
As a class we will compare how well our solutions perform compared to a Marxan
generated solution.

Data used in exercise


1. Planning Unit ID and its cost: PUID_COST

Figure 1: Planning unit identifiers and cost

2. Area occupied by each species in each square: SPEC1_SPEC2_SPEC3

Figure 2: Distribution of species 1, 2 and 3

Case Study Profile


Case study region: Tasmania, Australia (terrestrial)
Objective: Identify cost-effective areas for acquisition that protect a portion of each
biodiversity feature.
Decision support tools: Marxan, Zonae Cogito, Map Window GIS, Quantum GIS,
Qmarxan.
Key reference: This project is a mini version (less data, smaller study region, etc.) of
a larger spatial prioritization project performed under contract to Australias
Department of Environment and Water Resources. The final report for this project is
located in the course folder to give you a more complete description of the project,
data, and approach:
Klein, C, J. Carwardine, K. Wilson, M. Watts, H. Possingham. 2007. Spatial
Prioritization Approaches for the Conservation of Biodiversity in Australia:
Considering Conservation Costs, Ecological & Evolutionary Processes, and LargeIntact Areas. Report to the Department of Environment and Water Resources.
This course manual describes how to build a Marxan dataset with Quantum GIS
(QGIS) 1.8.0 Lisboa (QGIS) and the Qmarxan 0.98.2 QGIS plug in. Please consult
the Marxan Manual and Marxan Good Practices Handbook as needed for technical
information on Marxan. These are included in the folder
"C:\MarxanIntroCourse\manuals".
Day 2 of the course describes how to conduct analysis and interpret results with
Marxan, Zonae Cogito, and Map Window GIS.
Quantum GIS
QGIS is an Open Source Geographic Information System (GIS) licensed under the
GNU General Public License. It is an official project of the Open Source Geospatial
Foundation (OSGeo). It runs on Linux, Unix, Mac OSX, Windows and Android and
supports numerous vector, raster, and database formats and functionalities.
http://www.qgis.org/
Qmarxan
Qmarxan is a set of free software tools for the creation of Marxan input files within
QGIS. It was written by Apropos Information Systems.
http://aproposinfosystems.com/products/qmarxan/
This software suite allows you to build and run Marxan datasets on the computing
platform of your choice (Windows, Mac OSX, or Linux). Here we describe the use of
the software on Windows with a case study.

v Launch a web browser, and make sure youre logged into the Internet before
launching QGIS. If youve already launched QGIS, close it down, and then
ensure youre logged into the Internet. If you can access google.com, then
youre logged into the Internet.
v Navigate to "C:\MarxanIntroCourse" and double click on
MarxanIntroCourse.qgs to launch the QGIS project.
v Explore each data layer so that you have a better understanding of the type of
information that you will be working with in this course.
Enable the Qmarxan plug-in
v In QGIS, click the "Plugins" menu. If you can see a "Qmarxan" item, then you
don't need to take any action because the plug-in is already installed. If there is
no "Qmarxan" item, you will need to install it before you can proceed.
v To install Qmarxan, click the "Plugins" menu, and click "Fetch Python
Plugins...". Your form should then look like this:

v If Qmarxan is not installed, select it in the list and click "Install/upgrade


plugin". Qmarxan will now be installed and ready to use. If you cant find
Qmarxan, type Qmarxan into the Filter box.
The data layers are:
tas: Tasmania study region
reserve: IUCN reserves in Tasmania
cost: Cost data: Unimproved land value layer to represent acquisition costs at a
resolution of local government areas
bird1: Distribution data for a single bird species.
nvis: a selection of broad vegetation groups from the Australian National Vegetation
Information System

Step 1: Creating Planning Units


Here we use Quantum GIS and Qmarxan to create a set of hexagonal or square
planning units that covers our study region, Tasmania.
Planning units refer to the grid or cell size that you will do your analysis on. For
example, planning units of 5 x 5 km squares might be appropriate for management
scale of terrestrial or coastal environments, while
larger cells might be more appropriate for open
ocean analyses. Planning units can be squares or
polygons. From these planning units, we will then
use GIS to calculate the area within each planning
unit covered by each species/vegetation
distribution, and use these quantities to run our
Marxan analysis.
Here we create a planning units for the Tasmania
dataset with 5 x 5 km cells (5000 x 5000 m). Note
that the GIS data for Tasmania is in main units of
meters.
We demonstrate how to create a planning unit layer
using a free extension for QGIS, called Qmarxan.

Creating Data Input Files


Step 1a: Creating Planning Units
Here we use Qmarxan to create a shape file with polygons or hexagons that cover our
entire study region, Tasmania.
In QGIS, click the "Plugins" menu, select "Qmarxan", then click "Create Planning
Grid".
On the form that displays, set these parameters:
- Select the "Planning Grid Extent" to be "tas", then click "Update extents from layer".
- Select Hexagons or Squares, whichever you prefer,
- If youre using hexagons, select "Side Length" to be approximately 4000, and if
youre using squares set it to be approximately 5000. You can use a larger side length
to have fewer planning units, and a smaller side length to have more planning units,
- Use the "Browse" button to select an "Output shapefile", and call it pulayer.
Your form should then look like this:
9

Now click "Ok" to generate the planning units. When it is finished running, click
"Close".
Note: We provide two methods for extracting the planning units only for Tasmania.
One method is outlined in Steps 1b and 1c. Another method is outlined in Step 1d.
These methods are complementary and it would be useful for you to try both
methods out and see which would best suit your application of Marxan.
Step 1b: Select the planning units intersecting your study region, Tasmania
Here we use Quantum GIS to select the subset of polygons we created in step 1a that
are wholly or in part contained within our study region, Tasmania.
In the "Vector" menu, select "Spatial Query", then click "Spatial Query". If you cant
see the Spatial Query item, you need to switch on the Spatial Query Plugin. You
find this by clicking the Plugins menu, then clicking Manage Plugins.

10

On the form that displays, set these parameters:


- Set "Select source features from" to "pulayer",
- Set "Where the feature" to "Intersects",
- Set "Reference features of" to "tas".
Your form should then look like this:

Now click "Apply" to select the planning units that intersect Tasmania. When it is
finished running, click "Close".
Step 1c: Save selected planning units to a file
Here we use Quantum GIS to save the selected polygons to a new shape file. This
gives us a planning unit layer that contains only polygons that are contained wholly or
in part in our study region, Tasmania.
In the "Layer" menu, click "Save Selection as Vector File...". On the form that
displays, use the "Browse" button to set "Save as" as shown below:

11

Ensure you switch on the "Add saved file to map" option, then click "Ok".
Step 1d: Select the planning units intersecting your study region, Tasmania
Here we use Quantum GIS to intersect the hexagon or square polygons we created in
step 1a with our study region, Tasmania, and write the intersected polygons to a new
planning unit layer that only contains polygons that intersect with our study region.
In the Vector menu, select Geoprocessing tools then click Intersect
On the form that displays, set these parameters:
-
-
-

Set Input vector layer to pulayer,


Set Intersect layer to tas,
Use the Browse button to select an Output shapefile.

Your form should then look like this:

12

Now click OK to return the planning units that intersect with Tasmania. When it is
finished, click Yes on the pop-up window to add the new layer to your map. Then
click Close.

Step 2: Creating the planning unit file (pu.dat)


Here we use Quantum GIS and Qmarxan to create a Marxan planning unit file that
tells us how much each planning unit costs, and if the planning unit is already
reserved or available to be considered as a reserve. The planning unit file contains the
planning unit id, cost, and status (availability for consideration as a reserve). A
fragment of a planning unit file is illustrated below.

Step 2a: Creating Cost Field


Here we create a cost field to be used in our Marxan planning unit file. We do this by
intersecting our planning unit layer with our cost layer, and computing the mean of all
the cost values that intersect with each planning unit.
13

In the "Plugins" menu, select "Qmarxan", then click "Calculate Conservation Values".
On the form that displays, set these parameters:
- Set "Select Planning Grid" to "pulayer_tas",
- Set "Select input layer type" to "Area",
- Set "Select layer to measure" to "cost",
- Set On multiple intersections use to Mean,
- Set "Enter New Measure Field Name" type "cost",
Your form should then look like this:

Now click "Ok" to calculate the planning unit cost. When it is finished running, click
"Close".

14

The planning unit cost has been saved to the planning unit attribute table as a field
called "cost".
Step 2b: Identifying currently protected areas
Here we use Quantum GIS to calculate how much of each of our planning units is
already reserved. We do this so well know how much of each planning unit is already
reserved and we can classify the planning units as already reserved or available to be
considered as a reserve.
In the "Plugins" menu, select "Qmarxan", then click "Calculate Conservation Values".
On the form that displays, set these parameters:
- Set "Select Planning Grid" to "pulayer_tas",
- Set "Select input layer type" to "Area",
- Set "Select layer to measure" to "reserve",
- Set "Enter New Measure Field Name" to "reserve",
Your form should then look like this:

15

Now click "Ok" to calculate the amount of reserve in each planning unit. When it is
finished running, click "Close".
Step 2c: Create Status Field
Here we use Quantum GIS to create a status field for our Marxan planning unit file.
The status field tells Marxan which of our planning units are already reserved, and
which planning units are available to be considered as a reserve. We say the planning
unit is reserved if contains more than twenty million square metres of reserve. Note:
we consider a planning unit reserved if at least half of it is reserved, and were
assuming twenty million square metres is about half a planning unit.
In the "Layers" list on the left, right-click "pulayer_tas" then click "Open Attribute
Table".

16

- On the form that displays, click the "Toggle editing mode" button:
- Now click the "New Column" button:
- On the form that displays, set "Name" to "status", then click "Ok",
- Now click the "Open field calculator" button:
- Select "Update existing field", set it to "status",
- Click the "Expression" box, type "0" (0 means the planning unit is available to be
considered as a reserve).
Your form should then look like this:

Now click "Ok" to set a status of "0" for all planning units.
Now click the "Advanced search" button.
On the form that displays, set these parameters:
- Double click the "reserve" field,

17

- Click ">" (greater than),


- Click in the "SQL where clause" window,
- Enter "20000000" (twenty million).
Your form should then look like this:

Click "Ok" to select the planning units that have roughly 50% or more of their area
occupied by reserve.
- Now click the "Open field calculator" button,
- Select "Update existing field", set it to "status",
- Click the "Expression" box, type "2" ( 2 means that the planning unit is already
reserved).
Your form should then look like this:

18

Click "Ok" to set the status of planning units that have roughly 50% or more of their
area occupied by reserve to "2".
- Now click the "Toggle editing mode" button
to switch off edit mode,
- Click "Save" when prompted to save the changes to the planning unit attribute table,
- Click the "Unselect all" button
to de-select the planning units whose status you
have just set to "2",
- Click "Close" to close the attribute table window.
Step 2d: Export data to create planning unit file
Here we use Qmarxan to export the cost and status information we have created in the
prior steps to a Marxan planning unit file.
In the "Plugins" menu, select "Qmarxan", then click "Export to Marxan".
On the form that displays, set these parameters:

19

- Set "Select Planning Grid" to "pulayer_tas",


- Click the "Browse" button to set the output directory,
- Click "pu.dat" to select the planning unit output file,
- Click "Create Planning Units File (pu.dat)" to switch it on,
- Set "Planning Unit Cost Field" to "cost",
- Set "Planning Unit Initial Status Field" to "status",
Your form should then look like this:

Click "Ok" to create the planning unit file "pu.dat" in the output folder
"C:\MarxanIntroCourse". Now click "Close" to return to QGIS.

Step 3: Creating the species file (spec.dat)and the planning unit


versus species matrix (puvsp.dat)

20

Here we use Qmarxan to create a species file and a planning unit versus species
matrix. The species file lists the conservation features/species and the target amount
(as a proportion of the total in the region in this case) to be included in the reserve
system. A fragment of a species file is illustrated below.

For the Tasmania dataset we will calculate the total area covered by each of the
included vegetation classes using the nvis layers, and the one bird species distribution
using the bird1 layer. Then we will set the desired target of 30% protection of each
species range/vegetation class using the prop field in the spec.dat file- 0.3 = 30% of
the total area calculated for that conservation feature.
The planning unit versus species file tells us how much of each vegetation type and
bird distribution is contained in each planning unit. A fragment of a planning unit
versus species matrix is illustrated below.

**We provide you with


1) a series of layers that detail the extent of a selection of vegetation types in Australia
(nvis) Each of the vegetation types will be a conservation feature.

21

2) a layer that details the distribution of one bird species (bird_raster).

v Open up the layers and its table to familiarize yourself with the data.
Step 3a: Calculate area in each planning unit for the bird species
Here we use Qmarxan to calculate how much of the bird species is contained in each
planning unit.
In the "Plugins" menu, select "Qmarxan", then click "Calculate Conservation Values".
On the form that displays, set these parameters:
- Set "Select Planning Grid" to "pulayer_tas",
- Set "Select input layer type" to "Area",
- Set "Select layer to measure" to "bird1",
- Set "Enter New Measure Field Name" to "bird1",
Your form should then look like this:
22

Now click "Ok" to calculate the amount of bird1 for each planning unit. When it is
finished running, click "Close". The planning unit attribute table now contains the
amount of bird1 for each planning unit in the field "bird1".
Step 3b: Calculate area in each planning unit covered by each vegetation type
Here we use Qmarxan to calculate how much of each vegetation type is contained in
each planning unit.
In the "Plugins" menu, select "Qmarxan", then click "Calculate Conservation Values".
On the form that displays, set these parameters:
- Set "Select Planning Grid" to "pulayer_tas",
- Set "Select input layer type" to "Area",
23

- Set "Select layer to measure" to "nvis2",


- Set "Enter New Measure Field Name" to "nvis2",
Your form should then look like this:

Now click "Ok" to calculate the amount of nvis2 in each planning unit. The planning
unit attribute table now contains the amount of nvis2 for each planning unit in the
field "nvis2".
Repeat Step 3b 15 times, once each for nvis vegetation types 8, 9, 14, 20, 21, 28, 29,
31, 35, 41, 43, 44, 49, 51, and 58. Each time you repeat the step, substitute the layer
name and field name "nvis2" with the layer name you are currently processing.
The planning unit attribute table now contains a field for each of the 16 vegetation
types. The field for each vegetation type contains the amount of vegetation type in
each planning unit.
24

When you are finished, click "Close" to return to QGIS.


Step 3c : Export data to create the planning unit versus species matrix, and the
species file
Here we use Qmarxan to export the bird and vegetation type information created in
the prior steps to a Marxan planning unit versus species matrix, and a Marxan species
file.
In the "Plugins" menu, select "Qmarxan", then click "Export to Marxan".
On the form that displays, set these parameters:
- Set "Select Planning Grid" to "pulayer_tas",
- Click the "Browse" button to set the output directory,
- Click "spec.dat" to select the planning unit output file,
- Click "Create Species File (spec.dat)" to switch it on,
- In the "field_no" field, click the check boxes to switch on the row with name
"bird1",
- In the "field_no" field, click the check boxes to switch on each of the 16 vegetations
types with names "nvis2" through to "nvis58",
- Edit the "prop" field for bird1 and each of the vegetation types, changing it to "0.3".
This sets the target for each of our species to 30% of the total area for the species.
Your form should then look like this:

25

- Now Click "puvspr.dat" to select the planning unit output file,


- Click "Create Planning Units vs Species File (puvspr.dat and puvspr_sporder.dat)"
to switch it on,
- Set "Scale species data from 0 to 1" to "Raw".
Your form should then look like this:

26

Now click "Ok" to create the planning unit versus species matrix, and to create the
species file.
Click "Close" to return to QGIS.

Step 4: Creating the boundary length file (bound.dat)


The boundary length file records the spatial relationship between pairs of adjacent
planning units and is used for spatial compactness functionality in Marxan. For each
pair of adjacent planning units, an entry in the boundary length file is created that
records the boundary length between the pair of adjacent planning units. The
boundary length file is used by Marxan to give the reserve network configuration the
degree of spatial compactness that we require.

27

Step 4: Create the boundary length file


Here we use Qmarxan to compute the boundary length between each pair of adjacent
planning units, and write all the boundary lengths to a Marxan boundary length file.
In the "Plugins" menu, select "Qmarxan", then click "Export to Marxan".
On the form that displays, set these parameters:
- Set "Select Planning Grid" to "pulayer_tas",
- Click the "Browse" button to set the output directory,
- Click "bound.dat" to select the boundary length output file,
- Click "Boundary File (bound.dat)" to switch it on.
Your form should then look like this:

Now click "Ok" to create the boundary length file then click "Close" to return to
QGIS.

28

Step 5: Establish a standard file structure for the Marxan


database
Here we create new folders and rearrange the Marxan input files, input parameter file,
and planning unit layer to conform to a standard Marxan database file structure. We
do this so that Marxan will be able to interpret our planning problem and generate
reserve network configurations for us, and so that each Marxan database we create
will have a standard file structure to minimise our confusion when looking at the files.
If we dont conform to a standard file structure, then we might get confused and make
a mistake when trying to understand the information contained in a Marxan database,
and Marxan might not be able to run or the output might be rubbish.
Using the Windows explorer:
- Browse to the folder "C:\MarxanIntroCourse",
- Create a sub-folder here called "Marxan_Database",
- Browse to the folder you have just created
"C:\MarxanIntroCourse\Marxan_Database",
- Create a series of sub-folders here called "input", "output", and "pulayer".
- Browse to the folder "C:\MarxanIntroCourse",
- Copy the file "Marxan.exe" to the folder
"C:\MarxanIntroCourse\Marxan_Database".
Your Marxan_Database folder should look like this:

- Browse to the folder "C:\MarxanIntroCourse",

29

- Copy the files "pu.dat", "spec.dat", "puvspr.dat", "puvspr_sporder.dat", and


"bound.dat" to the folder "C:\MarxanIntroCourse\Marxan_Database\input",
Your input folder should look like this:

- Browse to the folder "C:\MarxanIntroCourse",


- Copy the files "pulayer_tas.dbf", " pulayer_tas.shp", and " pulayer_tas.shx" to the
folder "C:\MarxanIntroCourse\Marxan_Database\pulayer",
Your pulayer folder should look like this:

30

Step 6: Creating the input parameter file


Here we use Qmarxan to create a Marxan input parameter file. The input parameter
file tells Marxan where the input files are, and which parameters to use with Marxan
when processing those input files.
In the "Plugins" menu, select "Qmarxan", then click "Configure Scenario".
On the form that displays, use the "Browse" button to set "Select scenario directory
(where input.dat is or needs to be created) to "
C:/MarxanIntroCourse/Marxan_Database"
Now click on "Files and Costs", and use the "Browse" buttons on that tab to set the
parameters to look like this:

31

Now click "Ok" to create the input parameter file.


Click "Close" to return to QGIS.
Some of the parameters specified in this file will be set by you. These parameters are
indicated in yellow in the example input.dat below.

32

In Explorer, right click the input.dat file youve just created, then select edit with to
open it with the text editor of your choice (like Notepad). Compare your input.dat to
this one. Are the parameters the same? Hint: for INPUTDIR, delete the file pathway
so the parameter just reads input, and for OUTPUTDIR delete the file pathway so
the parameter just reads output.

33

v Find the first highlighted parameter, BLM. Set this to 0 for the base Marxan
database you are creating. BLM stands for Boundary Length Modifier, and the
higher the BLM, the more clumped together your solutions will be.
v Set the NUMREPS to 100. When performing the calibration steps on day 2
you may want to reduce this to 10 to reduce the time taken for the calibration
steps. This is the number of solutions Marxan will find each time you run it.
NUMREPS stands for number of repetitions.
v Make sure that the Input file and folder names match the names of your files.
v Change MISSLEVEL to 1
v SCENNAME You will change this to help identify which scenario the results
are from. For now, just leave it as output as we are not yet setting up a
scenario.
v Make sure the OUTPUTDIR (output directory folder name) matches the name
of your output folder.
As indicated above, you can change many other parameters using the input.dat file.
To find out more, consult your Marxan manual.
v Save the changes to your input.dat in the Marxan_database folder.

Step 7: Running Marxan for the first time


You are now ready to run Marxan. We run Marxan to check that our database is in a
format that it understands. If Marxan wont run, it probably means there is an error
with one or more of our files or with our file structure. Troubleshooting will need to
be performed if Marxan wont run.
Browse to the Marxan_database folder, and double click on Marxan.exe to start
running Marxan.
If you have created all the input files properly, Marxan will generate solutions and
you will see something similar to the screen shot below.

34

Step 8: Displaying Marxan spatial output in Quantum GIS


These steps show you how to import your results from Marxan and display them as a
map in Quantum GIS:
Import Best Solution or Summed Solution
The Best Solution file tells us which planning units were in the reserve network
configuration that had the lowest objective function score out of all the reserve
network configurations generated by running Marxan. The Summed Solution file tells
us how many times each planning unit was chosen across all of the reserve network
configurations generated by running Marxan.
Here we use Qmarxan to import the information from the Best Solution and Summed
Solution files and store it in the planning unit file.
- In the "Plugins" menu, select "Qmarxan", then click " Import Marxan Results",
- Select your planning units file on the "Planning Grid" control,
- Select "pu_id" on the "Planning Unit Id Field" control,
- Browse "output_best" from your local Marxans output folder if you want to import
the Best Solution,
or
- Browse "output_ssoln" if you want to import the Summed Solution results,
- Select "Create New" on the "Select Results Field Name" control to add the Marxan
results to a new field of your planning unit file,
- Type "Best" or "SSOLN" on the "Enter New Results Field Name" control to give
your new field a name.
Your form should then look like this:

Now click "OK" to write the Marxan result file to the planning unit dbf table.
35

Display Best Solution or Summed Solution


Here we use Quantum GIS to display a map showing us which planning units were
selected in the reserve network configuration for the Best Solution generated by
Marxan, and to display a map showing how many times each planning unit was
selected across all of the reserve network configurations generated by Marxan.
- Double click on the planning unit layer in the list on the left panel of Quantum GIS,
- Click on the control that says single symbol and select "Categorized" if you want
to display Best Solution or "Graduated" if you want to display Summed Solution,
- Select the appropriate Column, "best" or "SSOLN",
- For the Best Solution, youll need to click the Classify button.
Your form should then look like this:

Now click "OK" to display the Marxan result in Quantum GIS. This concludes the
exercises and activities for day 1 of the introduction to Marxan course.

36

You might also like