4 - ExtractingAndProcessingIUCNRedListSpeciesDataUsingVectorsQGIS - v1 - 0 (728652)

Download as pdf or txt
Download as pdf or txt
You are on page 1of 37

USING SPATIAL INFORMATION TO SUPPORT DECISIONS ON

SAFEGUARDS AND MULTIPLE BENEFITS FOR REDD+

STEP-BY-STEP TUTORIAL V1.0:


EXTRACTING AND PROCESSING IUCN RED LIST
SPECIES DATA USING A VECTOR METHOD
IN A COMBINATION OF QGIS 1.8 AND 2.8
Using open source GIS software to support REDD+ planning

The UN-REDD Programme is the United Nations Collaborative initiative on Reducing Emissions from
Deforestation and forest Degradation (REDD) in developing countries. The Programme was launched
in September 2008 to assist developing countries prepare and implement national REDD+ strategies,
and builds on the convening power and expertise of the Food and Agriculture Organization of the
United Nations (FAO), the United Nations Development Programme (UNDP) and the United Nations
Environment Programme (UNEP).

The United Nations Environment Programme World Conservation Monitoring Centre (UNEP-WCMC)
is the specialist biodiversity assessment centre of the United Nations Environment Programme
(UNEP), the world’s foremost intergovernmental environmental organisation. The Centre has been in
operation for over 30 years, combining scientific research with practical policy advice.

Prepared by Corinna Ravilious, Lucy Goodman, Blaise Bodin, Lisen Runsten and Matea Osti

Copyright: UNEP

Copyright release: This publication may be reproduced for educational or non-profit purposes
without special permission, provided acknowledgement to the source is made. Re-use of any figures
is subject to permission from the original rights holders. No use of this publication may be made for
resale or any other commercial purpose without permission in writing from UNEP. Applications for
permission, with a statement of purpose and extent of reproduction, should be sent to the Director,
UNEP-WCMC, 219 Huntingdon Road, Cambridge, CB3 0DL, UK.

Disclaimer: The contents of this report do not necessarily reflect the views or policies of UNEP,
contributory organisations or editors. The designations employed and the presentations of material in
this report do not imply the expression of any opinion whatsoever on the part of UNEP or
contributory organisations, editors or publishers concerning the legal status of any country, territory,
city area or its authorities, or concerning the delimitation of its frontiers or boundaries or the
designation of its name, frontiers or boundaries. The mention of a commercial entity or product in
this publication does not imply endorsement by UNEP.

We welcome comments on any errors or issues. Should readers wish to comment on this document,
they are encouraged to get in touch via: [email protected].

Citation: Ravilious, C., Goodman, L., Bodin, B., Runsten, L. and Osti, M. (2015) Using spatial
information to support decisions on safeguards and multiple benefits for REDD+. Step-by-step tutorial
v1.0: Extracting and processing IUCN Red List species data using a vector method in a combination of
QGIS 1.8 and 2.8. Prepared on behalf of the UN-REDD Programme. UNEP World Conservation
Monitoring Centre, Cambridge, UK.

Acknowledgements: With thanks to support provided by IUCN, the Global Forest Resource
Assessment of the FAO, the FAO-Finland Technical Collaboration Programme, Tanzanian Forest
Service, FAO Tanzania, Sokoine University, André Mazinga (OSFAC) and Eric Lutete (OSFAC).

These training materials have been produced from materials generated for working sessions held in
Tanzania with the National Forestry Resources Monitoring and Assessment of Tanzania, FAO Tanzania
and Sokoine University, and the Democratic Republic of the Congo with OSFAC, to aid the production
of multiple benefits maps to inform REDD+ planning and safeguards policies using open source GIS
software.
Using open source GIS software to support REDD+ planning

Contents

1. Introduction ...................................................................................................................... 1

2. Using IUCN Red List species data and generating species richness maps .............................. 1

2.1. Selecting and downloading species data from the IUCN Red List website ...................... 1

2.1.1. Searching for non-spatial data ................................................................................. 1

2.1.2. Save the search and exporting to CSV format.......................................................... 3

2.1.3. Download the IUCN Red List spatial data layers ...................................................... 5

2.2. Vector Spatial Data Selection and Preparation ................................................................ 6

2.2.1. Format species CSV file in preparation for joining to the spatial data..................... 6

2.2.2. Use SQL query to select species of interest from spatial dataset ............................ 9

2.2.3. From the previous selection select out the current native species range ............... 12

2.2.4. From the previous selection select out terrestrial species ranges........................... 13

2.2.5. Split the final subset IUCN dataset into separate files by species ........................... 14

2.2.6. Batch clip the separate species datasets to area of interest ................................... 15

2.2.7. Merge individual files back into a single dataset ..................................................... 16

2.2.8. Dissolve and convert to single part features ............................................................ 19

2.2.9. Save dataset to an equal area projection................................................................. 20

2.2.10 Check data for topological errors ............................................................................. 23

2.2.11. Clean the dataset to remove the errors ................................................................... 24

2.3. Vector analysis to create species richness (in QGIS 1.8 only as requires QMarxan plugin) 25

2.3.1. Generate a dataset of hexagons or squares using the Qmarxan plugin .................. 25

2.3.2. Generate species richness using the Qmarxan plugin ............................................. 26

2.3.3. Check any errors located in the error log and spot-check for quality control ......... 27

Annex1 : Cleaning the topology using GRASS GIS ............................................................. 29


Using open source GIS software to support REDD+ planning

1. Introduction

REDD+ has the potential to deliver multiple benefits beyond carbon. For example, it can promote
biodiversity conservation and secure ecosystem services from forests such as water regulation,
erosion control and non-timber forest products. Some of the potential benefits from REDD+, such as
biodiversity conservation, can be enhanced through identifying areas where REDD+ actions might
have the greatest impact using spatial analysis.

Open Source GIS software can be used to undertake spatial analysis of datasets of relevance to
multiple benefits and environmental safeguards for REDD+. Open-source software is released under a
license that allow software to be freely used, modified, and shared (http://opensource.org/licenses).
Open Source GIS software can be used to undertake spatial analysis of datasets of relevance to
multiple benefits and environmental safeguards for REDD+. Open-source software is released under a
license that allow software to be freely used, modified, and shared (http://opensource.org/licenses).
Therefore, using open source software has great potential in building sustainable capacity and critical
mass of experts with limited financial resources.

This tutorial demonstrates how a species richness grid could be created using species range data from
the IUCN Red List (IUCN, 2013). It provides full instructions of how to select and analyze and export
information from the non-spatial species data on the IUCN Red List website and how to further
analyze the information along- side the IUCN spatial data using QGIS, an open-source desktop GIS
software. Please note that the last part of the tutorial can currently only run in QGIS version 1.8 as it
is reliant on the QMarxan plugin that is not yet available in more recent versions.

2. Using IUCN Red List species data and generating species richness maps
2.1. Selecting and downloading species data from the IUCN Red List website

The IUCN Red List of Threatened Species website allows users to search for and extract tabular
information (in comma separated values (CSV) file format) on the status of threatened species. The
website provides a user friendly interface and gives the user flexibility to customize searches based on
a range of criteria. Users must register with the website to save and export customized searches.

2.1.1. Searching for non-spatial data

Open a web browser and go to


the IUCN Red List website at
http://www.iucnredlist.org/.

Click on continue to the IUCN


Red List

1
Using open source GIS software to support REDD+ planning

This search below is an EXAMPLE search for mammals, birds and amphibians with threat status of
Critically Endangered (CR), Endangered (EN), Vulnerable (VU), Lower Risk: Conservation Dependent
(LR), Near Threatened (NT), Data Deficient (DD) or Least Concern (LC).
a. Click on Other
Search Options

b. Click on Taxonomy

c. Expand ANIMALIA
d. Expand CHORDATA
e. Tick AMPHIBIA,
AVES and MAMMALIA,
f. Press the arrow key to send the
selection across to the Your Search
Criteria panel
You may want to limit the
search to a single location e.g.
a single country or group of
locations only.
g. Click on Location, expand
land regions, expand and tick
the country of interest
h. Press the arrow key to send
the selection across to the
Your Search Criteria panel

i. Next Click on Assessment


j. Untick categories not required
i.e. in this example unticking
EX and EW and keeping the rest.

k. Press the arrow key to send the


selection across to the Your Search
Criteria panel

l. Click Run search

This search will result in a list of species within the AMPHIBIA, AVES and MAMMALIA taxonomic groups
that have critically endangered, Endangered, Vulnerable, Lower Risk: Conservation Dependent, Near

2
Using open source GIS software to support REDD+ planning

Threatened, Data Deficient or Least Concern Red List status. The search will produce a list of species
with additional attribute data, including the threat status of each of the species.

There are other criteria that you may want to include. For example, to limit the search to species
dependent upon a particular habitat type you would click on Habitat, the expand and tick the relevant
habitat type and send that across to the search criteria panel.

2.1.2. Save the search and exporting to CSV format

a. Click
Save/Export Search

b. If already registered,
fill in your email address
and password and click
login

c. If you have not yet


registered, you need
to create an
account
(see box below)

An account is
needed in order to
save and export
the search results.

d. New users will be asked to


fill out the details in the
box below

The first time new users export a search,


they are required to fill out some information
about themselves and the intended use of
the data

Click on Supply your


information and fill in the requested details

Click on Submit

3
Using open source GIS software to support REDD+ planning

e. Once registered and/or


logged in, Click on Add your
currentSearch

f. Give the search a name


e.g. NGA_AmpAveMam in this
example

g. Click add to saved searches

h. Click on the saved search e.g.


NGA_AmpAveMam in this
example

i. Scroll down to Export results


and click on Export results

The dataset will then give a


status of Queued for export.

An email will be sent to you once it has


been exported. This is usually within
minutes but may take hours for large
searches).

j. Refresh the browser to see the status change to show the export is complete or if it is taking
a long time log out and once the email has been received, log back in to the Red List website
and click on the My Downloads Tab to get back to your saved searches.

4
Using open source GIS software to support REDD+ planning

k. Click on the exported search


e.g. NGA_AmpAveMam in this
example

l. Scroll down to the Export results

m. Click on Comma-Separated Values (CSV)


and the zip file will download

n. If the download has placed the file in a


general download folder move the zip
file to a more suitable location e.g. in a
project folder
o. Rename the zip file to somthing sensible
e.g. NGA_AmpAveMam.zip in this
example
p. Right click on zip folder, extract the csv
file

q. Rename the csv file e.g. NGA_AmpAveMam.csv in this example

2.1.3. Download the IUCN Red List spatial data layers

The next steps are for downloading spatial data. It is only possible to download the whole global
dataset. It is not possible to filter by county prior to download. It is important to note that some of the
spatial datasets are very large. If you have received the spatial data directly from IUCN you can skip
this section.

a. Open a web browser and go to the IUCN Red List website at


http://www.iucnredlist.org/
b. From the Resources tab, click on Spatial Data Download

5
Using open source GIS software to support REDD+ planning

c. Scroll down on the Spatial Data page to the Datasets table

d. Click the links to navigate to each dataset and download the following global datasets:

 Mammals
 Amphibians
 Birds (via the link to the BirdLife Data Zone)
(Leave Reptiles for now as assessment is not yet complete for all species)

These files are all stored in geographic coordinate system (EPSG: 4326). Be aware the files are
very large and will take some time to download.
Note: If you have received the spatial data directly from IUCN they may have delivered as a
single geodatabase containing all taxa in a single feature class rather than as separate files.

2.2. Vector Spatial Data Selection and Preparation

2.2.1. Format species CSV file in preparation for joining to the spatial data

a. Open the 'exported search' results csv file (that was downloaded in section 2.3 step m) e.g.
NGA_AmpAveMam.CSV in this example. Open the file Excel (or if using completely open
source software in Gnumeric or Libre Office Calc) (The Screengrab examples below use Excel.

6
Using open source GIS software to support REDD+ planning

b. Scroll along the column headings of the table. Some will need to be changed as GIS software
such as QGIS will not accept them. Change the ones listed below in red
OLD Field Name New Field Name

Species ID = Species_ID

Kingdom = Kingdom

Phylum = Phylum

Class = Class

Order = Order

Family = Family

Genus = Genus

Species = Species

Binomial = Binomial

Authority = Authority

Infraspecific rank = Inf_rank

Infraspecific name = Inf_name

Infraspecific authority = inf_auth

Stock/subpopulation = stk_subpop

Synonyms = Synonyms

Common names (Eng) = com_eng

Common names (Fre) = com_fre

Common names (Spa) = com_spa

Red List status = rl_status

Red List criteria = rl_criteria

Red List criteria version = rl_version

Year assessed = year_ass

Population trend = poptrend

Petitioned = Petitioned

7
Using open source GIS software to support REDD+ planning

c. Click File>>Save to save the file (keeping the file format as csv). If it asks if you want to keep
the file in this format click yes

Keep the CSV file open as it will be used in section 2.6 where we will use the 'species_id'
column to prepare an SQL query to be used in QGIS.

d. Open a text editor and create a new empty csv file and add the following text to correspond
to the data types of each of the columns in the .csv file. e.g. the Species_ID column should
contain integer values

"integer","string","string","string","string","string","string","string","string","integer","string",
"string","string","string","string","string","string","string","string","string","string","string","st
ring"

These are the data types for each of the fields in the species csv file.

e. Save the file with the same name and in the same folder as the species csv file but with the
a .csvt ending e.g. NGA_AmpAveMam.csvt in this example

This will ensure that when the file is opened later in QGIS that the numeric (Integer) fields are read
with the correct data type, otherwise QGIS will default to making all the fields text (string).

The next steps will prepare an SQL query which will be used QGIS to select out the polygons from
the large spatial dataset which are in the species list. This method is being used rather than using a
'join' to join the species list to the spatial data because the join function often fails or causes errors
on this very large spatial dataset.

f. Go back to the 'species list csv file. e.g. NGA_AmpAveMam.CSV


Then copy and paste the Species_ID column into column B a new excel worksheet

8
Using open source GIS software to support REDD+ planning

g. In row 2 of column A type "id_no" = a (make sure you put a space after the equals sign as this
is important for the SQL syntax we are creating
h. In row2 of column C type OR(this time make sure you put a space before the OR as this is
important for the SQL syntax we are creating.)
i. In row 2 of column D type =A2&B2&C2

j. Next fill Columns A, B, C and D by


double clicking on the bottom right hand
corner of each cell in row 2

k. Delete the entire first row so that the file


now looks similar to the illustration
below

l. Save the worksheet for later to a new file e.g. in this example called
formatted_for_SQL_query.xlsx and close

2.2.2. Use SQL query to select species of interest from spatial dataset

The next section prepares the spatial data ready for analysis. The IUCN spatial dataset is a complex
dataset as it contains many overlapping polygons for each species for the entire world. Even
subsetting the dataset for your area of interest can be problematic so these set of instructions are
important steps to make sure the analysis runs as smoothly as possible and to reduce the risk of
errors in processing.

a. Open QGIS
b. Add in the IUCN Species
spatial dataset(s) (the data
are in geographic
coordinate system (i.e.
EPSG:4326)

c. Untick the dataset in the table of contents to stop it drawing

9
Using open source GIS software to support REDD+ planning

d. Add in a polygon dataset of the area of interest (e.g. country boundary) e.g. in this
example nga_border_dd.shp. Make sure the dataset is in geographic coordinate
system (i.e. EPSG:4326) to match the coordinate system of the IUCN spatial data
e. Click on the IUCN spatial dataset in the table of contents to make it the active layer
e.g. in this example iucn_rl_species_2014_2_no_sens

f. Right click on the IUCN spatial dataset and Click Filter

g. A Query window appears. Copy and paste into the Query window the SQL query that
you created earlier. This will select out only those species present in the exported
species list
h. Remove the OR from the last row and click Test to
check you got the syntax correct. This may take 5 -
10 minutes or longer depending on how many
records are being selected. If correct it should
return the number of rows selected

10
Using open source GIS software to support REDD+ planning

Note: This number does not equate to the number of species but to the number of
polygons so you cannot use this to check that the number of species it has selected is
correct.

i. Click OK to close the Query Result window


j. Click OK to apply the filter to the IUCN spatial dataset and close the Query Builder
window.

k. To see that the dataset


now only shows the
filtered records right
click on the IUCN spatial
dataset and click on
Open Attribute table

Note the attribute table shows only the records filtered by the SQL query.

l. Close the attribute table


m. Right click on the IUCN spatial
dataset and Click Save as

n. Save the file with a new name.


e.g. nga_iucn_selection.shp in this
example and Click OK

Note: Saving may take a long time (likely 40


minutes for a selection with about 1500 species
from the global layer) so be patient.

11
Using open source GIS software to support REDD+ planning

o. Right click and Remove the IUCN spatial dataset in


the table of contents e.g. in this example remove
iucn_rl_species_2014_2_no_sens

2.2.3. From the previous selection select out the current native species range

a. Right click on the newly added subset species layer e.g.


nga_iucn_selection.shp in this example and and
Click Filter

b. To only include categories as advised by IUCN


Presence - 1 (extant); 2 (probably extant); 6 (presence
uncertain) Origin – 1 (native); 2 (reintroduced); 5
(origin uncertain)

Put the following


expression into the
Query Builder window:-
"presence" = 1 OR
"presence" = 2 AND
"origin" = 1 OR "origin"
= 2 OR "origin" = 5

c. Click Test
d. Click OK to close the
Query Result window

e. Click OK to close the Query Builder window


f.
g. Right click on the subset
IUCN spatial dataset e.g
nga_iucn_selection.shp in
this example and
Click Save as
h. Save the file with a new
name. e.g.
nga_iucn_selection_PO.shp
in this example

12
Using open source GIS software to support REDD+ planning

i. Click OK

2.2.4. From the previous selection select out terrestrial species ranges

a. Right click on the newly added subset


species layer e.g.
nga_iucn_selection_PO.shp in this
example and and Click Filter

b. To only include species which are


terrestrial put the following expression
into the Query Builder window:
"biome_terr" = 't'
c. Click Test
d. Click OK to close the Query
Result window

e. Click OK to close the Query


Builder window

13
Using open source GIS software to support REDD+ planning

f. Right click on the subset IUCN spatial dataset e.g nga_iucn_selection_PO.shp in this
example and Click Save as

g. Save the file with a new name. e.g. nga_iucn_selection_PO_T.shp in this example

2.2.5. Split the final subset IUCN dataset into separate files by species

a. From the Vector menu >> Data


management tools >> Split vector
layer

14
Using open source GIS software to support REDD+ planning

b. Under input vector layer choose


the name of the species range file
you want to split. e.g. in this
example
nga_iucn_selection_PO_T.shp

c. Under unique ID field choose the


field to base the split on. Select
id_no, this contains a unique ID for
each species.

d. Select an output folder for the split species range files. e.g. in this example
C:\NGA_SpeciesRichness\nga_iucn_selection_PO_T_splits

e. Click OK

2.2.6. Batch clip the separate species datasets to area of interest

a. In QGIS 1.8 go to Analysis>>SEXTANTE toolbox (or in QGIS 2.8. Processing menu >>
Toolbox.

Note: - there has been significant improvement in


QGIS 2.8 in the batch environment and
therefore if possible use this rather than QGIS 1.8
which requires some manual filling of the inputs

b. In the search box at the top of the


toolbox, write clip.
c. Right click on clip and choose Execute as
batch process.

d. In the input layer column, click on the ‘...’ box and select all of the species range files
that you want to clip (use the shift key to select multiple files).

e. In the clip layer column, click on the ‘...’ box and select the vector boundary file
covering your area of interest.

f. Double click on the top of the clip layer column, to fill every cell. (This is the bit that
does not work in QGIS 1.8 and you have to copy and paste the contents into every row)

15
Using open source GIS software to support REDD+ planning

g. In the clipped column, click on the ‘...’ box and select the location to store your clipped
files and type a new name e.g. clip.shp (this will be the name preceding the filename of
the clipped files)
h. In the pop-up box, under Autofill
Mode select Fill with parameter
values.
i. These parameter values should be set
from the input layer.
j. Click OK.

k. Click Run

2.2.7. Merge individual files back into a single dataset

a. Remove all layers from your QGIS project


b. Add in all the clipped species shapefiles

16
Using open source GIS software to support REDD+ planning

c. Search for merge in the Processing toolbox

d. Double click on the SAGA Merge shapes layers tool. This is the only tool currently available
that lets you merge more than two shapefiles at once.

e. Click on the … next to the Main Layer and navigate to the folder containing the clipped
shapefiles. Pick the first shapefile in the list e.g. in this example
clipnga_iucn_selection_PO_id_no__219.0.shp

17
Using open source GIS software to support REDD+ planning

f. Click on the … next to Additional Layers and click Select All


g. Then untick the layer that you selected as the main layer. E.g. in this example
clipnga_iucn_selection_PO_id_no__219.0.shp

As we removed all other layers from the table of contents we can click ‘select all’. This adds the
rest of the species layers which will be merged with the layer chosen as the main layer.

h. Click OK

i. Click on the … next to Merged Layer and navigate to an output folder and save the Merged
Layer with a new name e.g. in this example mergedclips_nga_iucn_selection_PO.shp

18
Using open source GIS software to support REDD+ planning

j. Click Run

2.2.8. Dissolve and convert to single part features


a. From the main menu click on the
Vector>> Geoprocessing Tools>>Dissolve tool
b. Select the merged IUCN species range dataset for
the input layer
c. Select the species id_no as the Unique ID field (i.e.
the field to dissolve on)
d. Navigate to the output folder to save the dissolved
dataset with a new name e.g. in this example
C:\Workspace\NGA_Species_richness\
dissolvedmergedclips_nga_iucn_selection_PO
.shp

e. Next convert the dissolved dataset to single part


features (i.e. so that there is one row in the attribute table for every polygon rather than one
row for every group of polygons with the same attribute). From the main menu click on the
Vector>> Geometry Tools>>Multiparts to singlepart tool

f. Select the dissolved dataset as the Input


Layer e.g. in this example
C:\Workspace\NGA_Species_richness\
dissolvedmergedclips_nga_iucn
_selection_PO .shp

g. Navigate to the output folder to save


the dissolved dataset with a new name
e.g. in this example
C:\Workspace\NGA_Species_richness\
SP_dissolvedmergedclips
_nga_iucn_selection_PO .shp

h. Click OK

19
Using open source GIS software to support REDD+ planning

i. Remove all layers from your QGIS project except the singlepart species dataset generated in
the previous step
e.g. in this example C:\Workspace\NGA_Species_richness\SP_dissolvedmergedclips
_nga_iucn_selection_PO .shp

2.2.9. Save dataset to an equal area projection

In subsequent steps a layer called a planning unit layer will be generated in order to summarise the
species range data to create a species richness map. The planning unit layer may simply be a regular
grid of squares or hexagons across the area of interest or an irregular summary unit for example
territories within a country. The species range and the planning units layers must be projected to an
equal area projection (e.g. Lambert Azimuthal Equal Area). Using an equal area projection allows the
true area of the species ranges in each planning unit to be calculated. Whichever projection is chosen,
both the species ranges and the planning units must be in exactly the same projection.

In this example, the data are in CRS EPSG:4326 (a geographic coordinate system with units in decimal
degrees). In order to generate a planning units dataset of hexagons with a specific area, the data need
to be projected into an equal area CRS with units of meters. In the following example Lambert-
azimuthal-equal-area projection is used.

Note: - The there is currently a bug in the project tool in QGIS 2.8 and therefore below we are using
the right-click>> save-as option to change the projection

There may be an appropriate equal area projection that is already defined within QGIS suitable for
your area of interest, or you may have already defined a custom projection. To create a new a custom
projection follow the instructions in Box D.

a. To project the data Right Click on the singlepart species dataset and Click Save as...

20
Using open source GIS software to support REDD+ planning

b. Choose Selected CRS and click Browse next to the Save as box to create a new output
dataset e.g. SP_dissolvedmergedclips_nga_iucn_selection_PO_la.shp in this example

c. Click on Change to change the output ptojection. In this example we are using a custom
Lambert -azimuthal-
equal-area
projection.

d. Add the country


boundaries shapefile
back into QGIS e.g. in
this example
nga_border_dd.shp
and repeat the save
as step to save it in
same equal area
projection as your
species layer.

b. Remove the
Geographic version
of the datasets from
the QGIS project to
reduce confusion.

c. Finally, Right click on one of the layers and


Set Project CRS from Layer so that the
project projection is now the same as the
layers

There should now just 2 files in the project :-


 The projected species single part dataset: e.g.
SP_dissolvedmergedclips_nga_iucn_selection_PO_la.shp
 The projected country boundary dataset: e.g. nga_border_la.shp

21
Using open source GIS software to support REDD+ planning

Box D

It may be useful (although not always necessary) to


create a custom projection, for example a Lambert
Azimuthal Equal Area projection centred on a
particular country or world region. In this example,
the projection is centred on the Philippines, with a
Central Meridian (longitude of origin) of 123 and a
Latitude of Origin of 12. To centre the projection on
a different country or region, a different Central
Meridian and Latitude of Origin are required.

To create a custom projection, go to the settings


menu in QGIS and choose Custom CRS. Click Add
new CRS, and give your projection a name.

Choose the parameters. For a Lambert Azimuthal


Equal Area projection, click on Copy existing CRS,
and select
North_Pole_Lambert_Azimuthal_Equal_Area.
Click OK.

Then edit the information in the parameters box to


change the central meridian and latitude of origin
to centre the projection on a particular country or
region. For the Philippines this means setting
lat_0=12 and lon_0=123. Click OK.

22
Using open source GIS software to support REDD+ planning

2.2.10. Check data for topological errors

Check for topological errors in the data as these could prevent the Qmarxan plugin working correctly.

Check for geometry errors in the projected IUCN and the country boundaries shapefiles
j. From the vector menu click Geometry Tools>>Check geometry validity. Run for both
dataset. (Remember to click OK to run the tool)

k. In this example the country


boundaries file reported 0
errors

l. BUT In the IUCN data there are some


errors to fix.

Note the Feature Ids that contain errors.


These refer to the record id’s of the
polygons in the spatial dataset

If errors are reported continue to step 2.2.11, otherwise go straight to section 2.3

23
Using open source GIS software to support REDD+ planning

2.2.11. Clean the dataset to remove the errors

Search for clean in the processing toolbox

Double click on the v.clean.advanced tool

Note: If the dataset is very large and QGIS is failing to clean the dataset the clean tool can be run in
the native GRASS interface. Some guidance notes are provided in the Annex for cleaning a dataset
natively in GRASS.

24
2.3. Vector analysis to create species richness (in QGIS 1.8 only as requires QMarxan
plugin)

2.3.1. Generate a dataset of hexagons or squares using the Qmarxan plugin

a. Fetch the latest QMarxan plugin from the


QGIS tool repository and activate it from
the Plugins>>Manage Plugins menu

b. From the Plugins menu click


Qmarxan>>Create Planning Grid

c. Select the projected Area of interest


file e.g. nga_border_la.shp and click
Update extents from layer
d. Set unit area e.g. 1000000 for 1km
hexagons
e. Tick Limit create of grid by
intersection with layer
f. Navigate to a new output shapefile
g. Click OK
h. Click Yes to both windows that pop up
Using open source GIS software to support REDD+ planning

i. Zoom in to check that the hexagons have been created correctly

2.3.2. Generate species richness using the Qmarxan plugin

a. The next step is to use the planning units file to generate a count of number of
threatened species in each planning unit hexagon
b. From the Plugins menu click
Qmarxan>>Calculate Conservation Values

c. The Calculate Planning


Grid Conservation
Factor Values
window opens
d. Click New

26
Using open source GIS software to support REDD+ planning

e. Select the Planning Unit Layer generated in the previous step


f. Select the Planning Unit Id (this is unique ID for each hexagon in the planning units
dataset upon which the summaries will be made)
g. Set On intersection assign value to Single field
h. Set the On intersection use the following value to Measure X Field
i. Set the Select Field for Calculation to either the species ID or binomial
j. Set the On multiple operations use to Count
k. Set the new Output Field Name to be added to the planning units e.g. mam

l. Click Save
m. Click Run

2.3.3. Check any errors located in the error log and spot-check for quality control

a) In the Planning Units folder


open the error log generated by the
previous step

For each of the planning units listed


manually check the results of the features
listed

27
Using open source GIS software to support REDD+ planning

b) Right Click on the Planning Unit Layer and open the attribute table
c) Select the PU and zoom to it in the map canvas

d) Click on the IUCN species layer in the table of contents


e) Then Click on the Select Features by Polygon tool and
draw a polygon around the hexagon (PU) to select
features within the IUCN dataset corresponding to that
hexagon

f) The number selected should match with the count in the ‘mam’ field in the Planning Unit
Layer. Check again by drawing the polygon around the hexagon and if necessary alter the
value in the ‘mam’ field to match the number selected

This is the final species richness dataset.

The dataset can then be symbolized and placed in a map layout as in the example below
Below is an Example map output

Example Map

28
Annex1 : Cleaning the topology using GRASS GIS

GRASS GIS works best as a standalone programme, although it does have a QGIS plug-in, so many of
the GRASS tools are also available in QGIS. You may have used the GRASS v.clean tool from within in
QGIS). This example runs through cleaning of the IUCN data which can be a very large dataset
depedning on your area of interest and how many species you are working with. The standalone
version of GRASS is automatically installed when you install QGIS.

a. Click on Education>>GRASS GIS to


open GRASS

To use GRASS as a standalone


programme, it is necessary to set the
project location and mapset.

b. Click on the Location Wizard and


choose the location of the GIS data
directory, plus a folder name for the
project location.
For faster computation, choose a
location on your local drive and
avoid spaces in folder names.
c. Click on Start Grass

d. Click Next

e. Choose the option


Read projection and
datum terms from a
georeferenced data file

f. Click Next
Using open source GIS software to support REDD+ planning

g. Select the shapefile


containing the clipped and
projected species
range data with the
topological errors.
h. Click Next

i. Click Finish

j. Click OK

Wait for GRASS to create the new


project location.

Now import the species range data.

k. In the GRASS GIS Layer Manager, go


to the File menu >> Import vector
data >> Common import formats
[v.in.ogr]

l. Click Browse to choose the


shapefile containing the clipped and
projected species ranges. Under
options select the option extend
region extents based on new
dataset.
m. Click Import.

A range of cleaning processes will be


automatically undertaken during
the import process. This could take
several hours depending on the size
of the file being imported.

30
Using open source GIS software to support REDD+ planning

n. When the import is complete,


check the command console in
the GRASS GIS Layer Manager.

o. If there is no warning message


you can go straight to step p and
simply export the file from
GRASS.

If there is a warning message


(see screenshot), the next step is
to use the v.build procedure to
rebuild the topology (see Box A:
Rebuild topology below)

Box A: Rebuild topology

a. In GRASS GIS go to the Vector


menu >> Topology maintenance
>> Create or rebuild topology
[v.build].

Make sure name of input vector


map shows your file (it will have
@PERMANENT at the end of the
file name)

b. Click Run.
c. Check the command console to
find the results of the v.build. If
there is no warning message you
can now export the file from GRASS (goto step p)

If there is an error message, you now have two choices (see Box B or Box C)

31
Using open source GIS software to support REDD+ planning

Box B: Rebuild topology (option 1)

If the import didn’t take too long, you might prefer to re-import the file into GRASS, but this
time setting a snapping threshold.
a. To re-import the file and set a
snapping threshold, go back to
[v.in.ogr], as in step k, but this
time inlude an additional step
and click Command dialog
b. In the new window, browse to
find your species range file, and
select a name for output vector
map (the name of the new file
within GRASS)

c. Go to the Min-area & snap tab. Write


‘1e-014’ as the snapping threshold. It is
important to set a low threshold,
otherwise snapping can introduce errors.
If the distance between two points is
lower than the snapping threshold, these
points will be assumed to be in the same
place. This can correct many topological
errors, but it can also cause errors if the
snapping threshold is set too high. Even
with a very low threshold it is still
possible to introduce errors, and you will
later need to check that the cleaned
species ranges match the original ranges.

d. Click run and wait for the import to


complete. Again, this may take some
time.

e. Then go step (p) to export the cleaned


data from GRASS GIS.

32
Using open source GIS software to support REDD+ planning

Box C: Rebuild topology (option 2)

If the import was very slow, the other option is to continue using the uncleaned species range file
(the one that existed prior to the import into GRASS). Follow sections 2.9 and 2.10 to reproject
the file and to split it, creating separate files for each species. Then check for topology errors in
these separate species files (section 2.7) and where necessary clean these in GRASS, by repeating
the process described in section 2.8. If the files have been reprojected, they will require a new
‘project location’ in GRASS (simply repeat the process described in 2.8 a).

p. To export the file from GRASS, go to the File menu >> Export vector map > >Common
export formats [v.out.ogr]

q. Select the name of the file you want to export (it will have @PERMANENT at the end of
the file name) and under OGR output datasource name write the file path of the chosen
export location.

r. Go to the input tab,


uncheck line and
boundary and
check area

s. Go to the optional tab, and


select the option Export
features with category
(labelled) only. Otherwise all
features are exported.
t. Click run.

33
Using open source GIS software to support REDD+ planning

In the command output, ignore any


warnings that features found without
category were skipped.

u. Close GRASS.

v. Open QGIS and add the cleaned file that you exported from GRASS.
w. Use the ‘Add Vector layer button.
x. Check whether any topological errors remain (see section 2.7).

Make note of the species that are still affected by these errors, you may need to check these
manually and select them out and clean them on their own.

34

You might also like