Previous PageNext Page

2.4. Displaying information

In order to illustrate the first three sections of this chapter, a simple and concrete example will be given. It entails preparing and presenting a bitmap of Mali from a satellite image covering all of Africa. All the manipulations of the image in this example can be saved in the form of a batch file (see Section 2.6.), which allows you to retrieve it automatically.

2.4.1. Choosing window operation

To open an image, a map, bitmap or text, you have a choice of File commands: File Open or File Retrieve. Use File Open to display a selected file in a new window. Use File Retrieve to display a file in the active window. A table, a film, or a project must be opened in a new window with File Open. To bring back a window that was previously active in order to superimpose information in the active window, you can retrieve it simply by clicking on its icon that appears in the menu in the lower part of the screen.

An image must be shown before a map can be retrieved. It is necessary to avoid opening several images in the same window.

To view an entire image, use 0 as the default value for each of the co-ordinates.

Preparation of the image of Mali

The image covering all of Africa is opened using the command File Open Image:

The map of Mali is superimposed using the command File Retrieve Map:

2.4.2. Changing the display for images and bitmaps

When an image or bitmap has been opened, you can change the display using the commands View Zoom or View Pan. These commands can be used only within a normal window in a project. They cannot be deleted using the command Edit Delete. This command executed after a zoom or after moving an image will annul the command executed before the Zoom or Pan command, which will result in the loss of information.
The commands under the View Zoom menu will allow you to change the size of an image or bitmap. The commands under the View Pan menu will allow you to view a neighboring part of an image or bitmap.

In more detail, the commands available under the View Zoom menu are the following:

The View Previous command allows you to retrace all the layers in the active window. This function is most often used when the window size is changed. The zoom factor of all the maps and images is recalculated to adapt to the new window.

Preparing the image of Mali

View Zoom is used to reduce the view to the area that interests us: Mali.

Use the View Zoom In command, selecting the area with the cursor, the View Zoom Lat/Long if the latitude and longitude values are known, or the View Zoom Feature by clicking on the map of Mali.

2.4.3. Changing the presentation

Under the Edit menu you will find the usual operations (Undo, Cut, Copy, Paste, Delete). Details for using each of these commands is found in Chapter 3.

Under the Draw menu, you will find options allowing you to improve the presentation of a window. This is particularly useful in the case of a image that you wish to print or to save as a bitmap. The commands in the first part of the Draw menu allow you to create a point, a line, a polygon or rectangle in the dimensions that you specify, to write text, or to color an object or a feature.

The Draw Labels command allows you to write the names of the cartographic features on an image in the font and color you choose. The text will appear in the center of the object.

The command Draw Legend allows you to draw the legend in the font and color you choose. The location and size of the legend can be determined using the cursor. See the example at the right.

This diagram also shows an example of a special legend format. A classic legend is available by default by using the Options Show Legend command and setting the map and image legend to 0.

The Draw Color Bar command allows you to draw a color bar and choose the font and color of the text. You can see which colors are associated with the values of an image. It reproduces graphically the size of the classes of image values and the corresponding colors.

The location and the size of the color bar can be determined using the cursor. See the two examples at the right. The text viewed is situated in the legend field of the color bar (see section 2.4.5.). To improve the presentation, it may be necessary to adapt the contents of this field to your needs; for example, substituting the description attached to the pixel values, as shown in the example to the right.

The Draw Bitmap command allows you to superimpose a bitmap on the image on-screen by choosing the location with the cursor.

The difference between this command and File Retrieve Bitmap is that you can position the bitmap with Draw Bitmap.

Preparation of the image of Mali

With the command Draw Box you can create an area where you can write text (title, explanation, etc.). You can choose the color of the rectangle, the style and color of the border and the background.

Use the command Edit Cut to create a blank area in the image.

Character strings are introduced using the command Draw Text, which allows you to choose the font and the color of the text. The location of the text can be determined using the cursor

The legend as shown in the example above is drawn with the command Draw Legend, and the logo is added with the command Draw Bitmap. When you are satisfied with the presentation, you can save it in the form of a bitmap with the command File Save Bitmap.

2.4.4. Displaying cartographic data

One of the functions of WinDisp3.5 is to display a table of numerical data in the form of a map, provided that the cartographic information strictly conforms to the order in the map file (*.bna) and in the accompanying table. The first line of the data file is a list of the fields contained in that file. The following lines contain a cartographic feature label followed by the values of data for each of the fields given in the first line.

For example, the data in a table containing statistics for the provinces of a country can be displayed in the form of a map. The following is a file of statistics containing five fields of data relating to the production of oil-producing plants in Benin. Notice the line of '-9999', meaning "no data" for the province of Borgou:

The separator used must be a comma; therefore the decimal numbers must contain a point and not a comma.

The display is made by using the parameters 'Data File (optional)', 'Field of data (optional)' and 'Color table data (optional)' in the File Open Map window.

The map parameters displayed in the dialog window is shown on the map to the right:

Since the total production of oil-producing plants for the province of Borgou is not known (-9999), this province has no color in the display.

If a certain area of a map has not been colored in, the cause should be verified. It may be due to a difference in font between the object in the map file and that in the data file.

The tables, just as their fields, can be linked to variables in the project files (*.prj), as you can see in the following project extracted from the example given in Section 2.5.7.:

2.4.5. Color tables

Color tables are used to transpose the values of the image pixels (DNs - Digital Numbers) to specific colors when displaying an image. Each color is designated to a different class of data on the map. Text describing each color can be included and shown in a legend.

Because of difficulties in working with the Windows palette, a limited color scheme has been implemented. Each color in the color table is mapped to the most similar color in the Windows palette. These colors are shown in the list below (standard EGA colors). To insure accurate color representation, it is best to choose colors from this list.

 

VALUE COLOR RED GREEN BLUE
0 Black 0 0 0
1 Blue 0 0 128
2 Green 0 128 0
3 Cyan 0 128 128
4 Red 128 0 0
5 Magenta 128 0 128
6 Yellow 128 128 0
7 Light gray 192 192 192
8 Dark gray 128 128 128
9 Light blue 0 0 255
10 Light green 0 255 0
11 light cyan 0 255 255
12 Light red 255 0 0
13 Light magenta 255 0 255
14 Light yellow 255 255 0
15 White 255 255 255

The color table editor can be used to create and edit color tables. Use the command Option Edit Color Table. The name of the edited table will be written on the bar at the top of the window.

A. Edit Color Table Menu

File

   
 

New

Create a new color table (specify the number of lines)

 

Open

Open an existing color table (specify the name of the file)

 

Save

Save the color table under the same name

 

Save As

Save the color table under a new name

 

Exit

Exit the editor and return to the main window

Rows

   
 

Insert

Insert one or more lines under the line selected

 

Append

Add lines to the end of the table

 

Remove

Remove one or more selected lines

 

Define

Define the exact number of lines to create

 

Clear

Delete the values of the selected lines

Ranges

     
 

Images

   
   

Equal Intervals

Create classes with equal intervals, based on the max/min values of the image

   

Equal Quantiles

Create classes each containing the same number of values

   

Unique Values

Create a line for each unique image value

 

Maps

   
   

Equal Intervals

Create classes with equal intervals, based on max/min values

   

Unique Values

Create classes for each unique value

 

User defined

   
   

Equal Intervals

Create classes with equal intervals based on predefined max/min values

   

Unique Values

Create a line for each unique value

 

Clear

 

Delete all the values of classes and replace them with 0

Colors

 

Black to white

Create a gradual shading of colors going from black to white, on all or a selection of lines

 

White to black

Create a gradual shading of colors going from white to black, on all or on a selection of lines

 

Red to green

Create a gradation of colors going from red to green, on all or on a selection of lines

 

Clear

Delete all the colors and replace them with 0, 0, 0 (black), on all or on a selection of lines

Help

Open the help file dealing with editing color tables

B. Description of fields

A color table contains six fields delimited by spaces. The first line of the editor describes the fields.

Sample Color Table

FROM TO RED GREEN BLUE   LEGEND
0 2 255 255 255 Clouds
3 82 0 0 128 Water
83 94 128 128 0 Dark soil
95 110 255 255 0 Light soil
111 115 0 255 0 Light vegetation
116 130 0 128 0 Medium vegetation
131 255 128 0 128 Dense vegetation

C. FROM and TO fields

The fields FROM and TO delimit the range of image values assigned to a color. For an image, these values must be in the range of 0 to 255, and correspond to the actual digital counts, not the derived values such as for NDVI. Each value should be associated with only one color. They should not overlap. The value of a color should be greater than the TO value in the previous color. The color table editor allows you to change the values directly in the color table, and the new table can be saved using the File Save or the File Save As command.

D. RED, GREEN, and BLUE fields

The RED, GREEN and BLUE fields allow you to define the intensity of each primary color (from 0 to 255), in order to set the color that will be associated with each class of image values.

With the color table editor, the values can be changed directly in the table, allowing you to see the result of the combination of the three colors in the 'Colors' column. The new table can then be saved using the File Save or File Save As commands.

E. Colors

The color corresponding to the combination of intensities of the three primary colors is presented in this column. Clicking on the color will open a window containing the 16 standard EGA colors. Clicking on one of the standard colors will automatically replace the old color of the table, and the intensity values will be adapted. The new table can be saved with File Save or File Save As.

F. LEGEND field

The LEGEND field is an optional text field which can be displayed next to the colors in the legend.


Previous PageTop Of PageNext Page
This manual was prepared by the Global Information and Early Warning System of the United Nations Food and Agriculture Organization
© FAO/GIEWS - 1999
E-mail: Giews1@fao.org