Miscellaneous grid databases

 

On this page you can download a number of raster databases. They are to facilitate data analysis and exchange in the Harvest Choice project, but could be used in other projects as well. In this project we heavily rely on grid (raster) type spatial data. These data typically have a continental or global extent and is stored and processed in different formats (e.g. a MySQL database or DIVA-GIS gridfile). Some files cover the world, and others Africa only. The grids available here provide cell number identifiers, country identifiers, the fraction area that is land, and with values representing the area covered by each cell. There are grids for a number of different resolutions: 30 seconds, 5, 10, 30 minutes, and 1 degree.

 

Grids (resolution)

We define 5 grids with a global extent, using a "geographic" projection. Thus the upper left corner of the grid is at longitude = -180.0 and latitude = 90.0 and the lower-right corner of the grid is at longitude = 180.0 and latitude = -90.0 degrees. They have different "resolutions" (cells sizes): 30 seconds, 5 minutes, 10 minutes, 30 minutes, and 1 degree.

 

The 1 degree global grid has 360 columns and 180 rows, thus (360 * 180 =) 64800 cells (0, 1, 2, ..., 64799). To avoid confusion between grid cell numbers for grids with different resolution, I refer to the cell numbers of these grids as: cell1d, cell30m, cell10m, cell5m and cell30s. For example cell5m = 720 refers to the column 720 and row 0 while cell1d = 720 refers to column 0 and row 3 on their respective grids.

 

Grid name
 (resolution)

Number of columns

Number of columns

Number of rows

Number of
cells

Cell size
 (degrees)

Vertical cell
 size (km)

1 degree

360

360

180

64800

1

111.3

30 minutes

720

720

360

259200

0.5

55.7

10 minutes

2160

2160

1080

2332800

0.166667

18.6

5 minutes

4320

4320

2160

9331200

0.083333

9.3

30 seconds

43200

43200

21600

933120000

0.0083333

0.9

 

 

Countries

In the country grids, cell values are numeric code that identifies a country. The link between the identifier and the country name can be made via an access database (download below) or with this text file. The country grids were created by converting gadm polygons to a 30 second global grid, and aggregating using the mode (most common value).

 

Area

As we are dealing with unprojected grids (latitude/longitude) spatial units are in degrees, and cell resolution is constant in degrees, but not in m2. This is because one degree longitude is about 0.83 km at the equator, but 0 at the poles. The area grids provide an estimate of the size of each cell (in km2).

 

Fraction land area

Identifies the fraction of the grid cell that is land area. Derived from the 30 seconds country data.

 

Unique cell identifiers

For a grid of a certain resolution, irrespective of its extent, it is possible to always use the same identifiers for a specific grid cell, even if you are using only a subset of the data (e.g. Africa). A consistent numbering system like that assures a smooth data exchange and analysis. Grid (or raster) data consists of a rectangular area divided into rectangular (typically square) cells. In the example grid drawn below, the green area represents the grid, with in red the cell numbers starting at zero. There are 10 columns and 5 rows, hence 10*5 = 50 cells.

 

 

 

 

Columns

 

 

0

1

2

3

4

5

6

7

8

9

R
o
w
s

0

0

1

2

3

4

5

6

7

8

9

1

10

11

12

13

14

15

16

17

18

19

2

20

21

22

23

24

25

26

27

28

29

3

30

31

32

33

34

35

36

37

38

39

4

40

41

42

43

44

45

46

47

48

49

 

 

The sequential numbering starts in the upper-left corner, moves to the right, and then to the next line, to end in the lower-right corner. For computational reasons is easier to start with 0 than with 1 (because in most computer languages arrays are indexed from 0...n and not from 1...n). Therefore the identifier of the last cell will be the total number of cells minus one, which is  10 * 5 - 1 = 49  in this example. Row and column numbers also start with zero. Cell numbers only have meaning for a specific grid (computationally only the number of columns must be the same; but semantically the grid also has the same spatial extent (and resolution)). 

 

While a cell could be referred to with  a row and column number, it is in most cases much easier to have a single unique identifier (simpler queries for example), also because for the cases where this is necessary, computing the row or column number from a cell number is relatively trivial. Here are a number of example functions in R language that are useful in this context.

 

 

Downloads

 

Raster data ASCII grids.
download
  - cell number

  - country

  - area

Grid cells in a raster type format (arc Ascii format). For each resolution there is are three files. One file with cell numbers (filename = "hc_seq_*") , i.e. the unique identifier for each cell. There is a also a file indicating the country to which (the majority of) that cell belongs (filename = "hc_cnt_*"). Countries are identified with a numeric code that is linked to country names in the access database and also here. The country grids were created by aggregating from a 30 second grid , using the mode (most common value). Finally, there is a file in which the value represents the area of that cell in km2 (filename = "hc_area_*").

Grid (polygon) shapefile download

Same as above for the raster data, but the data are stored in a shapefile. I.e. each raster cell is a rectangular polygon with the cell number as an attribute. for easy (albeit perhaps inefficient) linking and displaying of data. Grid cells that only cover oceans or seas are not included.

MS Access database. hc_gricells.mdb
download

Database with three tables: "cells", "countries", and "gridspecs".

Table cells links the cell numbers of the different resolutions and also links these to the country numbers. This can be used to (dis) aggregate data, for example to distribute data at a 1 degree resolution to different countries.
Table "countries" provides the link between the country codes "CID" and country names. The "gridspecs" table provides some essential parameters for each grid such as number of rows.

Countries shapefile download

The country boundaries used to make the country grids. From the GADM database (version 0.9)  

 

Gridded data is included for all resolutions except 30 seconds resolution (because of the large file sizes). If you require cell numbers of country identifiers at this resolution you can use these (ascii) grids: 30 second cell numbers (this one is a very big download), area and for countries (much smaller download). All of these files are provide for reference; in many cases using a raster type file format and a programmatic approach to calculating cell numbers may be more efficient then linking to these files.

 


Geography @ IRRI

RH, 29 Feb 2008