Professional Documents
Culture Documents
Course Manual
Day 1
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.
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.
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:
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
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:
-
-
-
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.
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 "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
Click "Ok" to create the planning unit file "pu.dat" in the output folder
"C:\MarxanIntroCourse". Now click "Close" to return to QGIS.
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.
21
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
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
25
26
Now click "Ok" to create the planning unit versus species matrix, and to create the
species file.
Click "Close" to return to QGIS.
27
Now click "Ok" to create the boundary length file then click "Close" to return to
QGIS.
28
29
30
31
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.
34
Now click "OK" to write the Marxan result file to the planning unit dbf table.
35
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