A map with the number of mammal species based on IUCN redlist range maps

Author: Paulo van Breugel
Updated on: 2015-04-03


I am looking at species richness and number of threatened species across the landscape in eastern Africa and will explain briefly how you can create a map based on data from the IUCN Red List of Threatened Species spatial data set. From this site you can download expert validated range maps of species belonging to the taxonomic groups terrestrial mammals, reptiles and amphibians.

The maps are available as shapefiles. Not as one layer per species, but one (very) large shapefile that contains all the distribution maps of that group. If you don’t need it for the whole world, the first step you probably want to do is to clip the layer to your area of interest (there are various tools available in QGIS or you can do this from the command line using ogr2ogr.

If you import these shapefiles in GRASS GIS, they will be broken up into unique polygons. This is because GRASS GIS is a topological GIS as explained in more detail here, and therefore does not allow overlapping polygons. So, if you import the shapefile with terrestrial mammals for east Africa, you get something like this:

Vector distribution maps of the terrestrial mammals in east Africa from the IUCN red list.

The map shows some interesting patterns with some major regions where many species ranges meet / overlap. The next step is to compute a map with the number of species. The number of species at any given location is of course the same as the number of overlapping polygons at that location. But how do we get that number? And didn’t I just wrote that there are no overlapping polygons in GRASS GIS?

First a little bit of background about how GRASS GIS handles vector layers and attribute tables. Each polygon (unique feature) will have one or more records in the attribute table. The map features (geometries) are linked to their attributes via what is called a Layer in GRASS GIS.

As explained here, a vector layer can be linked to more than one attribute tables (note, it doesn’t need to be linked to a table), which is really neatly illustrated in Figure 1 on this page. If you import a vector layer with overlapping polygons, you will get a vector map with two layers. One that connects the polygons with the attribute table as explained above, and a layer 2 with categories that represent for each feature (polygon) the number of overlapping polygons in the original vector layer (with no linked to an attribute table).

This means GRASS is already doing automatically what I was asking for; counting the number species ( = number of overlapping polygons). Only, we don’t have those values in an attribute table so we cannot create a species-count map directly. The arguably easiest way is to convert the vector layer to a raster layer, whereby the raster values will be based on the values of Layer 2.

Convert the vector layer to a raster layer. Use as source of raster values ‘cat’.

You do this using the v.to.rast command, directly from the command line, or using the GUI like above (menu: vector: map type conversion: vector to raster). Make sure to select as source of raster values ‘cat’. And under the optional tab, select layer = 2 (layer number of name option).

Convert a vector to raster, using the cat value of layer 2, which in this case represent the number of overlapping polygons in the original shapefile that we imported.

Next, select a nice colour palette for your raster layer and you’ll have your map depicting the number of species listed (and mapped) for the IUCN red list.

Count of terrestrial mammal species. Based on range maps from the IUCN red list (http:www.iucnredlist.org/technical-documents/spatial-data)

This is only a first step, and there is much more you can get out of this data. For example, you can combine the maps with information species current threat status, population size and species habitat preference; all available from the IUCN red list. See for example this nice blog post about assessing habitat specialization using IUCN data.


Software: @grassgis
Subject: @species_distribution @range_maps @species_richness

If you have questions

If you have questions or comments about the text, let me know. You can use this contact form. Please make sure to include the page title ("A map with the number of mammal species based on IUCN redlist range maps") or page name ("species-rangemaps-richness").