|
| |||
|
Lake Tanganyika Project: Zambia National Site Characterisation and Catchment Management Design Workshop
GIS training module – Lesson 2 Thomas Gumbricht, ICRAF |
|
|
Lake Tanganyika Regional Integrated Management Project
A United Nations Development Programme (UNDP) Global Environmental Facility (GEF) project covering the Lake Tanganyika riparian countries, Burundi, the Democratic Republic of Congo, Tanzania and Zambia.
Training module created by Thomas Gumbricht, www.mapjourney.com
Last updated: October, 2010
LESSON 2 – SYMBOLIZATION
In this lesson you will learn about different types of attribute data; nominal data like names, ordinal data that gives an order without numbers, interval data where a number denotes a difference but the difference is not absolute, and ratio data which is data with absolute numerical values. The symbolization of attributes varies dependent on which type of data the attribute represents, and the lesson introduces symbolization of GIS data in DIVA-GIS. The lesson uses national GLASOD data as example.
With the project opened, save it as a new project (e.g. with the name lesson2 in the my diva folder) via the menu: Project – Save As.
In this lesson we will use a national index for land degradation rather than the original GLASOD (Global Assessment of Land Degradation) map used in lesson 1. Start by making the vector and image layers for glasod active – by first clicking on one layer in the Legend, then hold down both the Ctrl and Shift keys and click the other. Then also add the vector layer for generalised_bordes to the selection.
Then add the layer for country statistics on land degradation (\data_spatial\laketan\political\country_index.shp). Grab the polygon layer generalised_borders and drag it to the bottom of the DIVA-GIS legend in order for the other themes to be seen on top of the polygon (see lesson 1 to repeat changing the drawing order in the Legend).
A vector layer is actually composed of several separate files stored on the computer; one file for the geographic data (coordinates), one file that contains information on how the features relate to each other (called topology), and one file with attributes. Attributes are characteristics that describe the geographic feature. The attributes will vary dependent on if the geographic feature is a point, line or polygon, and what kind of phenomena the layer represents. Here are some examples:
Vector type | Example | Nominal attribute | Ordinal or interval attribute | Ratio attribute |
Point | Village | Type (settlement – building - other) | Size (small-medium-large) | Inhabitants (nr) |
Line | River | Name | Quality (good-bad) | Length, Width (m) |
Polygon | Country | Name | Land degradation (light - severe) | Area (square km) |
A village can be described as a point on a small-scale map with a specific geographic position. But a city also has other characteristics, called attributes in GIS-jargon. The village can be the settlement, or a school, a market center etc. The village type is a typical attribute that can be stored in a database and linked to geographic feature. This is how it is done in GIS. Furthermore, the attribute village type as used here is a description without any rank or order (a settlement is not better or worse, smaller or larger than a market center in general). Such an attribute, without any rank or numerical value, is called a nominal attribute. The village size is another typical attribute, but sizes can be ranked. If the ranking is loosely done, like for instance small – medium – large, then the attribute is called ordinal. If it has an order (large is bigger than small) but we do not know how much larger – hence ordinal. A village also has a specific number of inhabitants. Also the number of inhabitants is a typical attribute of the village. If we know the exact number of inhabitants, we can also say that one city has double as many inhabitants as another – this is a ratio, and hence the attribute is called ratio.
In the Identify window the information about the point you clicked is displayed. There are 8 attributes for the theme villages_vmap0_soa (F_CODE, F_CODE_DESC, NAME, NAME DESCRIPTION, TEXT among others).
Metadata
Ideally geographic data posted on the internet (or delivered on a CD like this project) should come with a full description of how the dataset was created, when it was done, how accurate it is, who did it etc. Such information is usually called metadata, and most layers on the project CD come with metadata. You can access all the metadata via the web-catalogue on the project CD.
A river (or road) is represented as a line in GIS. In the data file with the geographical data it is represented as a series of connected points. A river also has some typical attributes. The length of the river (or river segment) is a typical ratio attribute; the name is a typical nominal attribute. River water quality on the other hand is typically ordinal: good – mediocre – bad. It is difficult to put numbers on water quality, but you can often rank water quality conditions.
Click on the theme srtm_flowpath in the Legend to make this theme the active theme (it becomes lifted up). Turn it on by clicking the checkbox if it is not already on. Double click on srtm_flowpath to open the properties window
In the Properties window, select unique and choose the field as strahler and click on Reset Legend, you see that flowpaths have 4 attributes, coded from 1 to 4. The flowpath dataset is automatically generated from the SRTM data.
You can change the size of the different river segments by double clicking on the individual symbols and changing the size to correspond to the Strahler values 1 – 4.
A country is a typical polygon when represented as a vector in GIS. It has a boundary (line) that closes upon itself and hence forms a polygon. The country name is perhaps the most typical nominal attribute. The GLASOD data that you have used in lessons 1 and 2 are of interval type. A higher GLASOD value denotes higher land degradation. The original GLASOD data has been used to construct national indexes of land degradation, which is also an interval value. Most indexes are interval attributes, where the interval between numbers denotes the same difference, but where the ratio between numbers has no meaning. The most common ratio attributes for countries are area and population. Not only is for example Tanzania larger than Burundi, but we can also calculate that Tanzania is 14 times larger than Burundi, which is a ratio.
Make the theme generalised_borders the active theme and click inside Tanzania (or another country) in the Data View.
The attributes for Tanzania include all types of attributes: country name (CNTRY_NAME) and currency type (CURR_TYPE) are examples of nominal attributes; and population (POP_CNTRY) and square kilometers (SQKM_CNTRY) are ratio attributes.
Attribute table
You can make the window larger by sliding the mouse over the blue frame, clicking the mouse to grab the frame and then drag the mouse to change the size. You can also scroll in the database by clicking the slide button and dragging it. In the attribute table shown above you can see the database values for population (POPS_CNTRY) and country area in square kilometers (SQKM_CNTRY), and the currency used in the included countries (CURR_TYPE).
Click on any cell in the database to select the record (row) that that cell belongs to (Tanzania in the example below). Then click the Highlight button and blinking will highlight the feature you selected.
If you click the buttons for Pan To and Zoom To, DIVA-GIS will pan/zoom to the geographic feature represented by the selected record, and then highlight it by blinking.
There are three alternatives, each under its own tab, for symbolizing a layer: Single, Unique and Classes. Single puts a single symbol on all features in a layer, and is what DIVA-GIS uses as default when you add a layer (all layers in the Data View are symbolized using the Single alternative).
For the village points the attribute data included in the attribute table is both nominal and ratio, and you should choose Unique to symbolize nominal data. Hence click the tab for Unique, as shown below. Then you have to choose which field (column) in the attribute table you want to use for the symbolization. As you saw above, the field F_CODE contains nominal data separating capital cities from non-capital cities. Hence choose the field F_CODE from the Field drop down menu.
The Properties window should now show all Unique entries found in the field F_CODE (Al030, AL015, AL105 and AL135), as shown above. You can change the individual symbols for each Unique value, just click the little symbol icon as indicated above. The Symbol window will popup, and here you can choose the Style, Color, Outline and Border.
Select the Style of the symbol by clicking the drop down menu for Style (to the left above). To change the fill color of the symbol, double click the squared icon for color (to the right above). The Color window for selecting (or creating) colors will pop up. You can either select a predefined color or click the Define Custom Colors >> button to expand the window to allow your own definition of colors (indicate by the cursor in the image below).
In the example above, villages were symbolized using circles with different colors for different F_CODEs
The Properties window for lines looks similar to the one for points, and works much in the same way. If you remember from earlier in this lesson, the interval data for river size (number of upstream branches) is in the field STRAHLER. Interval and ratio attribute data can be symbolized using either Unique or Classes. As there are only a few classes of rivers it is easier to use Unique again. Click the Unique tab, and the Symbol window for lines will popup.
In the Symbol window for lines you can set the Style of the line, the Color and the Width. Look above in this lesson to interpret the coding of the attributes for srtm_flowpath, and symbolize the rivers. In the example below the river size (upstream branching) are visualized using line width with the color being the same for all features.
Make the polygon layer (generalized_borders) the active theme by clicking it in the Legend. Open the Properties window (e.g. double click the layer in the Legend). The attribute table for generalized_borders contains nominal, ordinal and ratio data. First you must set the fill type using the Single tab. In the Properties window, select the Single tab, and click on the rectangular icon for polygon symbolization.
The Symbol window for polygons will then popup. Change the Style to Solid Fill, as shown below.
Remember to click the OK button in the Symbol window, and the Apply button in the Properties window. Then click the Classes tab in the Properties window.
By default DIVA-GIS suggests 3 classes and a predefined color scheme that starts with light yellow and ends with medium blue. From the attribute table DIVA-GIS also calculates class breaks and puts them in the Properties window. If you just click the Reset Legend button, DIVA-GIS will symbolize the countries in the databases using these default settings. Click the Apply button to see the result in the Data View. The Classes alternative for symbolization can only be used for symbolizing numerical data, i.e. data that represent interval or ratio attributes. You can check that out by clicking the drop down menu for Numeric Field, only those fields in the database that contain attributes with numerical value will show up.
Add glasod datasets from \data_spatial\laketan\landhealth\vector . Double click on the glasod layer, in the Properties dialogue box, Select the field SEVER_A, representing degree of severity land degradation for symbolizing the areas included in the database. The higher the value of SEVER_A, the more severe is the land degradation. In the example below the symbolization is set to six classes, and DIVA-GIS automatically finds the natural breaks in the field to set the classes. The color scheme is set to start with light yellow and end with dark red. Then also the Label was changed to reflect the symbolization (at the top of the Properties window).
You must press the Reset Legend to apply the changes in the Properties window and the Data View.
The resulting map then looks like the example below. Note how the Legend label for the country layer also changed – in the example to Land degradation score.
More advanced GIS software can use different classification methods for grouping numerical data, including equal values, quartiles and standard deviation. Classifying data is a way to compress information and make map easier to read and interpret. But at the same time some information is lost.
Remember to save the project before finishing the lesson
The dataset contains layers with soil and geological data as given in the table below.
Data layer | Folder | File |
Soil | \data_spatial\laketan\soil\vector | afscntl |
Geology | \data_spatial\aketan\geology\vector | geo2_7g |
Geological provinces | \data_spatial\aketan\geology\vector | prov2_7g |
You will find both vector files (*.shp) and symbolized images (*.jpg) for each of the above themes. Select either the soil map or the geological map (not the geological provinces map) and add it to your DIVA-GIS project. Open the attribute table for the layer you selected, and find the best field for symbolizing your data. Symbolize the data, preferably using the same symbolization as in the associated image file. To find the correct symbol associated with the correct class you can either use the Identify tool in DIVA-GIS (put the jpg image on top of the shape layer, make the shape layer the active layer and then use the Identify tool to see which color goes with which feature class), or better, look in the metadata on the project CD (linked via the file name in the table above if you use the electronic version of this document). When the map is ready you should use the Map to Image tool in DIVA-GIS to export both the map and the legend, and paste them together in a word document (or other windows application). Below you see the soil map symbolized using DIVA-GIS, exported to the clipboard and then pasted into the document.
Soil map of Lake Tanganyika Map made for Lake Tanganyika project UNEP/ICRAF Thomas Gumbricht, 2010 |