FFS – Land degradation assessment Training module Lesson 4 Thomas Gumbricht ICRAF |
Using Farmer Field Schools Approaches to Overcome Land Degradation in Agro-Pastoral Areas of Kenya
Land degradation assessment – Baseline survey on spatial analysis of land cover / degradation trends and Toolkit Development.
Training module created by Thomas Gumbricht, www.mapjourney.com
Last updated: October 2007
LESSON 4 – GRID/RASTER DATA
In this lesson you will learn about the difference between vector and grid; to symbolize grid data, to work with stacks of multiple grid layers in DIVA-GIS, and the use map algebra to produce new grid layers. The lesson also introduces interpretation of data from multiple layers using both visualization and some built-in analysis tools in DIVA-GIS.
Thus far you have worked mostly with vector data, and one example of image (jpg) data (in lesson 1). Now it is time to look at grid (or raster) data. Grid or raster data are built like image data, with rows and columns of cells or picture elements (pixels) that build up a data layer. Each pixel represents a value, like elevation, vegetation density or a land cover class. Each pixel is of a certain size, the land cover and vegetation data you will use for the whole Kenya in this lesson is built from raster data where each cell represents 1km * 1km. In the raster data the cell is carrying the information about the attribute, not like in vector data where the attributes are stored in a separate database.
Natural phenomena like vegetation density, rainfall, elevation and land cover tend to vary continuously over space. The temperature does not jump at a certain location, but changes gradually. As raster data is portraying a surface with small cells it is often better to use raster data for representing natural phenomena. Another advantage with raster data is that it is easy to compare two datasets, say for instance rainfall and vegetation growth. A disadvantage with raster data is that it takes more storage space in the computer memory, and that it is less precise than vector data.
Things of a human origin tend to be discrete (have abrupt boundaries). Hence vector data is more suitable for mapping out objects like roads, administrative boundaries and other phenomena that are of human origin. The advantage with vector data is that it is more precise, takes less storage space, and can be linked to a database containing many attributes. But it is troublesome to use vector data for map calculations and for portraying continuously varying phenomena.
The grid file af_igbp_lc is not symbolized, and hence you need to symbolize it. Open the Properties window for the af_igbp_lc.grd, make it the theme active and e.g. double click it in the Legend. The Properties window for grid layers looks a bit different compared to vector files, but works in a similar way. It has three tabs, Legend, Info and History. Under the Info tab you can see size of the image (Columns and Rows), and the data type (in this case INT2BYTES, which means that the data is made up of integer values), the Min and Max values of the data in the grid (0 to 16 for af_igbp_lc.grd), and information about the extent, and which Projection the data is in.
Under the History tab, some metadata is usually found about how the layer was created. But for now we are mostly interested in the Legend tab.
In the Properties window click the Legend tab to get to the symbolization options for grid data in DIVA-GIS.
You can put a default symbolization using one of the options from the Select color scheme drop down menu.
The symbolizing of the image file af_igbp_lc.jpg is done using standard colors for land cover also used elsewhere. You can get to the metadata and legend through the project data web-catalog, but the symbolization colors are also shown in the figure below.
Ideally you should now try to put the same colors in the Legend for the grid theme with same name, and at the same time enter the correct label in the Label field. To change a color in the Properties window, double click the cell for Color and set the color using the Color window (exactly as with vector data).
The land cover data that you have used is derived from satellite data. It was done from analyzing the 2001 annual cycle or vegetation growth (the vegetation phenology) using the MODIS (MODerate Image Spectrometer) sensor that takes a picture of the whole Earth every second day, see the project data web-catalogue for details.
Repeat the steps you just did for bare also for woody cover, and all the vegetation field datasets will be nicely symbolized.
Make the three themes with vegetation cover fields active, by clicking each of them while holding down both the Ctrl + Shift keys.
Now you should try visually to interpret some of the data on vegetation and land degradation that we have used so far, by relating it to protected areas (national parks, game and forest reserves etc). The project dataset includes international data on protected areas at three different levels. All data is prepared by the International Union for Conservation of Nature (IUCN) and you can find the data layers in the folder \data_spatial\ke\mapdata\protected. To get to the metadata (the documents describing the data layers), you should open the data web-catalog that is on the project CD.
There are three layers included, each representing a different protection status (ke_national_otheraeras_poly.shp, ke_national_iucn1to6_poly.shp and ke_international_poly.shp), add them and then symbolize them so that you can differentiate them in the Data View. Open the attribute table for each of the three layers and look at the attributes, find out which attribute to use for labeling, and label each of the three themes. You can now zoom and pan in the Data View and visually explore the difference in vegetation coverage. Obviously the tree cover is higher in protected areas. Note that the datasets over protected area are from global datasets and their geometry is not completely accurate.
DIVA-GIS comes with some visualization tools for grid data.
The first tool is a simple transect tool where you can visualize East-West or North-South transects. As these tools are a bit unstable, they can cause the DIVA-GIS program to stop responding, hence it is good to save your project before trying them out. Make one of the vegetation field grid themes the active theme, then use the menu: Grid – Transect, to open the transect window.
You can copy the generated transect either as values (and paste it into e.g. excel) or as a graph (and paste it into e.g. a word document or a presentation). Just click the Values to clipboard button, or the Graph to clipboard button, then open an excel sheet or word, and use the paste function (or simply click ctrl-v inside excel/word) and the data will be pasted and ready. Close the Transect window.
A more advanced tool is to analyze the data value of a point for two or more grid files at the same time. DIVA-GIS has built in function to create stacks of grid files that can then be analyzed together, both graphically and using advanced mathematical and statistical functions. You must first build the stack, and then you can use it for various analysis purposes. You build a stack via the menu: Stack – Make Stack.
Click the Apply button and then Close.
The mathematical and statistical tools you can apply to stacks in DIVA-GIS are rather advanced. But here we will just use one simple option, namely to find out those regions where the vegetation cover is dominated by a single class (woody, herbaceous or bare). But first you shall create a mask that identifies the cells with valid data for vegetation fields.
DIVA-GIS contains many useful functions for doing calculations on grid maps (map algebra). You can reach them via the Grid menu. You should use the Reclass function to create a Boolean (0/1) mask for the vegetation field datasets. You want a mask that identifies cells with valid data for the vegetation fields (1 in the mask), and excludes the Nodata cells (0 in the mask). Go to the Reclass window via the menu: Grid – Reclass, and select any of the vegetation fields as Input (all three have Nodata in exactly the same cells). Click the Output button and create a new logical file name (veg_mask.grd in the example below). Then enter the reclass values as shown below. Remember that we are only interested in values from 0 to 100 (the valid data) and hence we reclass values in the range 0-100 to 1, other values will be set to 0 in the second row. Click OK to perform the reclassification.
The mask that you created should look like the one below.
From the vegetation field data you shall now create a new grid that shows the dominating vegetation field (tree, herbaceous or bare). The stack calculation functions are reached from the menu: Stack – Calculations. Select the stack you created above as the Input Stack. Click the top radio button and select the calculation to be Layer with highest value. The NULL as zero does not work, as we have not defined any NULL value (albeit we know that 253 is NULL, DIVA-GIS does not). Click the Output button and give the new layer to be created a logical name.
Click Apply to perform the calculation
The output grid is automatically added to your project, but it does not look too good. DIVA-GIS finds the dominating class where there are valid data, but somehow misses the cells were the stack images have equal values (the Nodata areas that have the 253 in all three grids included in the stack). But now we can use the mask we created before and get rid of those areas where there are no valid data.
In GIS-jargon it is called overlay when two layers are used in an algebraic calculation. You shall use the overlay function of multiplication to get rid of the Nodata areas in your grid showing the dominating vegetation field. The overlay function is in the menu: Grid – Overlay. Select the First input file to be your dominating vegetation field that you just created, and the second to be your mask, then click the radio button for Multiply and give a logical name for the Output file, Click Apply to start the Overlay calculation.
The grid resulting from the Overlay calculation is automatically added to the project, and now the map looks better. In order to check out which of the colors (classes) represent the different vegetation fields, make all the original vegetation field layers active (see above). With the resulting grid file on top in the Legend use the Identify tool to understand the classes in the result file. When you know which class represent which dominating vegetation field, you must symbolize the grid file showing dominating vegetation fields, e.g. as in the example below (the grid to symbolize has nominal values).
With the datasets we now have created and symbolized, we should be able to find out if there is any relation between the estimated land degradation from GLASOD, and land cover. Use the Add Layer to add the original GLASOD map (ke_glasod_geo.shp), in the folder \data_spatial\ke\mapdata\landstatus.
To interpret the attribute data for ke_glasod_geo you need to read the document describing GLASOD, included in the web-catalog on the project CD, with a direct link here.
Below you see the GLASOD map symbolized using a cross fill style in order for the underlying maps to be seen through. Can you find any relation between vegetation cover and land degradation, or between the dominating vegetation field and land degradation?
It seems that you have to do more work to track down the causes of land degradation.
Save the project, e.g. as lesson4.