Mapping Biomes

Recently (2008) the European Space Agency produced GlobCover (ESA GlobCover Project, led by MEDIAS-France), the highest resolution (300m) global land cover map to date. GlobCover uses 21 primary land cover classes and many more sub-classes. Land cover classification (LCC) schemes divide the earth into biomes. Biomes are the simplest way to classify vegetation which can be applied globally. LCC makes sense because the boundaries between different ecosystems (ecotones) are sharp. However, definitions vary and there is no agreed standard set of biomes.[1]

GlobCover Example

Puntarenas is a province on the pacific coast of Costa Rica.  The province has a typical mix of tropical land cover. This includes some spectacular examples of Pacific Rainforest, notably on the Osa Peninsula. Puntarenas has an area of ≈ 11,000 sq. km or about 120,000 GlobCover pixels.

13 land cover types are present in the GlobCover map below. The barplot on the right shows the total amounts present in each class.



The GlobCover legend (above) has mixed land cover classes, where more than one biome occurs  inside a map pixel. This is especially true in the man-made biomes (agriculture) . For example, there are three cropland land cover types depending on the relative amounts of other vegetation present.

GlobCover map making in R

R is a programming language, not a specialised geographic information system (GIS) such as GRASS or commercial packages. However applications of R to spatial problems is a growth industry.[2]

A GlobCover map similar to the above can be produced for any area of interest. The Geospatial Data Abstraction Library (GDAL) should be installed on your system. FWTools is the place to go. You also need R packages sp and rgdal installed. The regional GLOBCOVER map for Central America can be downloaded from ESA here. GlobCover is in GeoTiff format i.e. a Tiff image file which contains georeferencing information. The following GDAL command (from command line, or run from R using shell) creates a 4° x 4° submap centred on Costa Rica.

gdalwarp GLOBCOVER_200412_200606_V2.2_CentralAmerica_Reg.tif -te -86 8 -82 12 costaRica.tif

costaRica.tif is read into R using the rgdal package:

costa <- readGDAL("costaRica.tif")

costa has class SpatialGridDataFrame, which is a class defined in the package sp (loaded when rgdal is loaded).

Administative boundaries for Costa Rica were obtained from Global Administrative Areas (see Revolution R blog post)

con <- url("")

Costa Rican provinces are now contained in the object gadm of class SpatialPolygonsDataFrame. The boundaries of Puntarenas province (excluding Cocos Island) are extracted as follows:

temp <- SpatialPolygons(list(temp),proj4string=CRS(proj4string(gadm)))
punt.sp <- SpatialPolygonsDataFrame(temp, data.frame(cbind(2,2), row.names=c("puntarenas")))  # puntarenas

The overlay() method  is used to extract the land cover map puntarenas from costa:

puntarenas <- costa
puntarenas.overlay <- overlay(costa,punt.sp)  # 1 in interior of puntarenas polygons, 0 outside
puntarenasband1 <- costaband1*puntarenas.overlay

Unfortunately overlay() is rather slow, because it applies to the entire raster. Eventually puntarenas appears as a SpatialGridDataFrame which can be plotted using standard R tools such as image().

The code needed to generate the above plot is here.


[1] For example, the International Biosphere-Geosphere Programme (IGBP) land cover legend used 17 biomes. The University of Maryland map used 14 biomes. At much lower resolution, numerical weather forecasting models such as US National Center for Climate Prediction Global Forecasting System (NCEP-GFS) also use alternative schemes.


[2] Roger S. Bivand, Edzer J. Pebesma, and Virgilio Gómez-Rubio. Applied Spatial Data Analysis with R. Springer, New York, 2008



  1. Congratulations, your map is very good.
    I need to create a similar map, making his code to activate the “windows ()” the program provides Error: Could not find the “windows”
    This library function which belongs?

    Thanks for any help-
    Greetings from the global south, Valdivia, Chile.

  2. In Windows, the graphics window is controlled by the windows() command; in unix/linux, the X11 window is controlled by the x11() function. The size of the window is specified in inches as arguments to the function. For example, to get a window 8 inches wide by 6 inches tall

    x11(height=6,width=8) or windows(height=6,width=8)

  3. Thanks Paul, I was running R on Windows at the time of this post. On the Mac, quartz() is another alternative.

  4. I’m using FW Tools for the first time and I’m probably doing something wrong. I’ve downloaded the regional GLOBCOVER map for Central America and unzipped on my desktop. When I ran the GDAL command I recieved a message “ERROR 4: GLOBCOVER_200412_200606_V2.2_CentralAmerica_Reg.tif does not exist in the file system, and is not recognised as a supported dataset name”. Do I have to unzip the archives in a specific place so that the FW Tools can recognize it? Thank you.


Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.