Mapping Forest resource assessment 2010 data – part I

About a year ago I wrote a post about how to make a map showing deforestation rates in Africa based on the Global Forest Assessment 2005 by the Food and Agriculture Organization of the United Nation (FAO). The main purpose was to show how this could be done in R. It has since become the most viewed post on my blog, mostly by people looking for maps on deforestation or forest cover in Africa.

Autumn last year the new Global forest resources assessment 2010 (FRA) has been published by the FAO. Time for an update of my previous post. This time I will use GRASS GIS to create the vector layers and QGIS to create the final maps. However in this post I will just go through the first steps, viz., creating the vector layers. Creating the maps for publication will be for one of my next posts.

As an example I am creating a vector layer with the forest and woodland cover numbers, which you can find in sheet 2 of the excel sheet I just downloaded from the above-mentioned link. Surface areas are given in 1000 hectares, which I converted to km2. I furthermore replaced all no-data values by -999 and all non-significant numbers (n.s.) by 0 (zero).

I downloaded a map with national boundaries from the database of Global Administrative Areas (GADM). The data can be downloaded in various formats, including as a shapefile. For more details read my earlier post. I imported the shapefile with African countries to a GRASS database with SQLite backend database for the attribute tables. In that same SQLite database I imported the FRA data after which I combined the two tables.

CREATE TABLE FRA_Africa AS
SELECT GADM.cat, GADM.OBJECTID, GADM.NAME_FAO, FRA2010.*
FROM GADM LEFT JOIN FRA2010
ON (GADM.NAME_FAO=FRA2010.Country)

To check if all countries in the GADM attribute table have a matching entry in the FRA table, I used the following SQL

SELECT *, _ROWID_ "NAVICAT_ROWID"
FROM "FRA_Africa"
WHERE "Country"
IS NULL
GROUP BY "NAME_FAO"

This shows that there are six countries in the GADM databasefor which the names do not match those in the FRA2010. I corrected the names in the GADM table using the FRA2010 names (in one case I did the opposite as that would give me a shorter name, but it doesn’t really matter).

UPDATE GADM
SET NAME_FAO="United Republic of Tanzania"
WHERE NAME_FAO="Tanzania, United Rep of";
UPDATE GADM
SET NAME_FAO="Democratic Republic of the Congo"
WHERE NAME_FAO="Congo, Dem Republic of";
UPDATE GADM
SET NAME_FAO="Congo"
WHERE NAME_FAO="Congo, Republic of";
UPDATE GADM
SET NAME_FAO="Côte d'Ivoire"
WHERE NAME_FAO="Cte d'Ivoire";
UPDATE GADM
SET NAME_FAO="Réunion"
WHERE NAME_FAO="Runion";
UPDATE FRA2010
SET Country="Saint Helena"
WHERE Country="Saint Helena, Ascension and Tristan da Cunha"

And I ran the same query again to recreate the FRA_Africa table (I dropped the older version first of course), which I linked to the GADM vector layer. You can do this in GRASS GIS on the command line (see below) or by using the GRASS Attribute Table Manager.

v.db.connect -o map=GADM table=FRA_Africa

OK, now I have the vector layer with in the attribute table the forest and woodland cover (in km2 and in % of total land area). Next step is to create one (or more) nice looking maps. I will further explore how to do this in QGIS in a follow-up post.

About these ads

One thought on “Mapping Forest resource assessment 2010 data – part I

  1. Pingback: Mapping Forest resource assessment 2010 data – part II « Ecostudies

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s