THE WINMAP SOFTWARE


FishBase creates maps for more than 25,000 species

Maps are a convenient way to present information on the natural or introduced occurrence of species. In FishBase, maps are created anew from the information in the database whenever they are evoked; this is the only feasible way to deal with the distribution of more than 25,000 species.

Also, FishBase maps are not classical distribution maps but rather present the data on which such maps are based: the countries from which species are reported and the localities (points) where they have been collected. References to such occurrence are available in the COUNTRIES and OCCURRENCES tables under the species in question. Our decision not to show the traditional shaded areas to indicate the distribution of a species has often been criticized because despite our warnings, first-time users tend to interpret the highlighted countries as distribution area, which is of course grossly erroneous, especially for large countries that border more than one ocean. We plan to overcome this problem by including many occurrence points for many species as is done in the Atlas of North American freshwater fishes (Lee et al. 1980). Towards this goal, collaboration has begun with a number of museums. Thus, the current version contains over 600,000 collection records for over 18,000 species, and we expect this number to continue to grow (see the ‘OCCURRENCES table’, this vol.).

The global map used by WinMap is composed of coastlines/islands, country boundaries, rivers and lakes. These are vector data obtained from Micro World Data Bank (MWDB-II). MWDB-II is a highly compressed version of the full WDB-II, a digital map database of 200 Mbytes initially produced by the U.S. Central Intelligence Agency (CIA), then released for public distribution by the National Technical Information Service (NTIS), U.S. Department of Commerce, and now available in a CD-ROM called Mapping Resources CD-ROM #1 prepared by Micro Doc.

How to display a map

To display a map, click on the button with the globe icon in the SPECIES, GENUS INFORMATION, FAMILY, COUNTRY INFORMATION, INTRODUCTIONS, REPORTS or FISHWATCHER windows.

A dialog box (see Fig. 60) will be displayed allowing you to set several map options. The default settings will mark countries from which a species is reported with light green, countries to which a species has been introduced with orange rectangles and available occurrence points with yellow dots. You can also create maps that, for each fish introduction, show a (red) line (‘introduction paths’) between the country of origin and the country of introduction. These lines have red dots at either end and clicking on these provides details on the introduction in question. Plotting occurrence points for a genus or a family in addition to the species points is of interest to biodiversity studies.


Fig. 60.The WinMap dialog box illustrating default setting. These may be modified, e.g., to highlight reported countries.

Internet

You can also zoom in right away on selected countries or ecosystems, using the Special Maps button.

On the Internet, we use two different kinds of maps: a) the xerox map server which plots up to 100 points and allows zooming and overlay of country borders and rivers; and b) static maps for the world and continents, which allow to click on points and see the information behind them. You can access these maps if you click on the Point map link in the ‘More information’ section of the ‘Species Summary’ page. We have also provided some static biodiversity maps in the respective section of the ‘Search FishBase’ page. We plan to replace these rather crude maps with high quality maps and a GIS interface by purchasing respective licenses for Internet use from ESRI.

WinMap Options

The remainder of this chapter is very detailed and technical. It is meant for colleagues who want to use WinMap with their own software. Other users may want to skip this section. The following are the functions provided by WinMap:

  • Zoom: Click on the Zoom option in the menu bar, then use the mouse to move the pointer on the screen. WinMap displays the current position of the cursor in degrees and minutes in the lower right corner of the map. To zoom in on a desired portion of the map, select the upper-left corner and determine the size by dragging the mouse. Use the right button to cancel the operation. Note that after zooming in the gray color of the continents sometimes ‘floods’ the sea. In such case, please write down the coordinates of the upper left and lower right corner and send them to us, so that we can reproduce and fix the problem.

WinMap can print high-resolution maps
  • Capture: If you select Capture from the WinMap Menu, you are offered the options to either save the current map to the file C:\FISHBASE\TEMP.BMP or to call PAINTBRUSH (or PBRUSH) where you can modify and print the map;

  • Point info: If you double-click on an occurrence point (yellow dot), information about locality, coordinates, collector, year of collection, accession number, etc., as extracted from the OCCURRENCES table, will be displayed in a pop-up window.

How WinMap works

When WinMap is started from within FishBase, WINMAP.LST is generated in the C:\FISHBASE directory:

WINMAP.LST contains the names of the files to be plotted, including the base map and the overlays. For example, to plot a world map with country boundaries, rivers, lakes, occurrence points and highlighting countries of occurrence, WINMAP.LST will include the following:

You can use WinMap with your own database

    WORLD3._FL (a raster image of the world)

    COUNTRY3.DAT (country borders)

    DISTR.DAT (country where species occurs)

    RIVER3.DAT (major rivers)

    LAKE3.DAT (major lakes)

    POINT.DAT (point data with related information)

The files COUNTRY3.DAT, RIVER3.DAT and LAKE3.DAT are existing overlay files, while POINT.DAT and DISTR.DAT are generated by FishBase. WORLD3._FL contains vector map data. The files for the base map and other overlay files are found in the WinMap directory while the generated files are in C:\FISHBASE directory.

In general, the format for the WINMAP.LST file is as follows:

    <._FL file> [/X | /S][, x1, y1, x2, y2[, ratioFlag]]

    <overlay file | user file> [/legendFlag]

    .

    .

    .

where,

  ._FL file

Vector file of a base map which has a corresponding ._FR file. The ._FR file contains the map boundaries and the fill points used to ‘flood’ the land with gray;

Maps can be included in reports /X

An option to automatically create a TEMP.BMP file, exit from WinMap and continue printing, e.g., reports that use the TEMP.BMP file to include maps. With this option, colors will be changed to black and white (see Fig. 61);

  /S

An option that controls zooming in on high resolution maps. If the /S flag is not specified while plotting a world map and a zoom operation is done, world map files of different resolution will be used depending on the size of the zoom area. There are three world map files: WORLD1._FL, WORLD2._FL and WORLD3._FL. The WORLD1._FL file has the highest resolution and is used when zooming in on small areas;

 

x1, y1, x2, y2

A different map boundary to overwrite the default map extent specified in the ._FR file, where x1 is the minimum longitude; y1 is the minimum latitude; x2 is the maximum longitude; and y2 is the maximum latitude. Longitude and latitude are expressed in degree-decimal. This option allows zooming in on an area when calling WinMap, instead of starting with a world map (see Fig. 61).

 

ratioFlag

An option to maintain the aspect ratio. Specify ‘1’ to keep the aspect ratio of the original map or ‘0’ to disregard the aspect ratio. ‘1’ is the default value. If ‘0’ is selected, the aspect ratio will be determined by the map boundaries (see above);

 

overlay file

Vector files overlayed on the base map. See Overlay Files section for different types of overlays;

 

user file

Special type of overlay file (refer to User Files section for more information);

 

For example, in changing the first line of WINMAP.LST to:

    WORLD3._FL /X, 30.0, -35.0, 120.0, 23.0, 0

WinMap will plot the portion of the world map from 30ºE to 120ºE and 35ºS to 23ºN without maintaining the aspect ratio of the world map. The /X option tells WinMap to create a TEMP.BMP file then quit from WinMap.

Note: WinMap always expresses coordinates in degree-decimal. Use positive values for north and east, and negative values for south and west. For example, 12º33’N 174º45’W becomes 12.55, -174.75.

The Base Map

Plotting a base map requires a map file (._FL) and a range file (._FR). The map file contains the vector data and the range file gives the boundaries of a map. The map file has the following format:

    Latitude, Longitude, P
    Latitude, Longitude, L
    .
    .
    .

Here is an example of a ._FL file: the vector type P denotes the start of a new line and L the continuation of a line.

    65.0405, 180.0000, P
    64.7750, 179.4825, L
    64.8167, 179.4833, L
    64.5833, 178.5000, L
    64.7000, 178.7333, L
    .
    .
    .

The first row of a range file (._FR) consists of a map description, minimum longitude, minimum latitude, maximum longitude and maximum latitude. It may also contain points to fill the land with gray. For convenience, the fill points may be grouped by country. See the description of the DISTR.DAT file on how to fill countries with different colors. A range file looks as follows:

    Map description, MinLongitude, MinLatitude,
    MaxLongitude, MaxLatitude
    *CountryName, CountryCode
    Latitude, Longitude
    .
    .
    .
    *CountryName, CountryCode
    Latitude, Longitude
    .
    .
    .

For example, the WORLD3._FR file corresponding to the world map contains:

    WORLD MAP, -30, -70, -30, 90
    *AFGHANISTAN, 004
    33.75, 65.7167
    *ALASKA, 840A
    65.4667, -143.9833
    68.4833, 161.7167
    65.4667, 164.5667
    61.6833, 162.85
    .
    .
    .

Overlay Files

There are three types of overlay files that WinMap can use: POINT, LINE and POLYGON. These files have a .DAT file extension and have a header in the first row to distinguish what type of overlay they contain. Here are the different formats for each type:

The POINT Overlay

The POINT overlay allows the placing of colored symbols on a map. It has the format:

    POINT, DATAnxx[, [PointSize][, RedValue, GreenValue, BlueValue]]
    Latitude, Longitude, "Year", "Place", "LongDescription"
    .
    .
    .

Here is an example of an occurrence data file for Oreochromis niloticus niloticus:

    POINT, DATA

    32.067, 34.800, "1927","Ras-el-Ain","Bewsher, BMNH 1927.10.17.8-14, Ras-el-Ain, near Jaffa (Tel Aviv)."

    32.000, 35.000, "1984","Yarkon River","Fishelson, not catalogued, Probably Yarkon River"

    32.000, 35.000, "1984","Yarkon River","Fishelson, P 628, 927, Probably Yarkon River"

Note that the data above represent three rows. Latitude and longitude are given in degree-decimal. The points plotted by this file are ‘active dots’, i.e., the information in quotation marks is displayed upon double-clicking on the left button of the mouse.

You can use other colors and symbols

DATAnxx is used to specify the data type: n - for the types of symbols; xx - for the color codes. The values of n are: 1 - filled circle, 2 - unfilled circle, 3 - filled square, 4 - unfilled square. The the values for xx are: 00 - black, 01 - blue, 02 - green, 03 - cyan, 04 - bright red, 05 - magenta, 06 - brown, 07 - light gray, 08 - gray, 09 - light blue, 10 - light green, 11 - cyan, 12 - red, 13 - light magenta, 14 - yellow, 15 - white. If the file header does not specify the data type, the default will be used which is yellow points with the four different types of symbols.

If you want to use different symbols and/or colors, these have to be stored in separate POINT files (see USER FILES below).

Indicating a pixel value in the PointSize parameter which is expressed in device units can change the size of the symbol. The actual point size is double the value indicated. The default PointSize = 4.

WinMap uses the 16 standard VGA nondithered colors. These colors are represented by a combination of 8-bit RedValue, GreenValue, BlueValue variables. Each value can be 0 to 255. Table 3 shows the different combinations for each color.

Table 3. Colors available for use with WinMap.

Red Green Blue Color Code Color
0 0 0 00 Black*
0 0 128 01 Blue*
0 128 0 02 Green
0 128 128 03 Cyan*
255 0 0 04 Bright red
128 0 128 05 Magenta
128 0 0 06 Brown
192 192 192 07 Light gray*
128 128 128 08 Gray
0 0 255 09 Light blue*
0 255 0 10 Light green
0 255 255 11 Light Cyan
128 0 0 12 Light red
255 0 255 13 Light magenta
255 255 0 14 Yellow
255 255 255 15 White

 

*The colors marked with an asterisk are already used by the base maps.

 

To be able to change the default colors that WinMap uses, different values can be given for RedValue, GreenValue and BlueValue, especially if the display board supports more than 16 colors. For a 256-color display board, we recommend four additional colors (see Table 4). The 24-bit color display boards can display 256 x 256 x 256 = 16.7 million nondithered colors.

The above example of a POINT overlay used the default point size and color. To use larger dots in light magenta, the user may change the file header into the following line:

POINT, DATA, 6, 255, 0, 255

 

Table 4. Additional colors for display with more than 16 colors..

Red Green Blue Color Code
192 220 192 Pale green
166 202 240 Light blue
255 251 240 Off-white
160 160 164 Medium gray
 

The option to change the default colors also applies to LINE and POLYGON overlays.

The LINE Overlay

The LINE overlay allows the drawing of vector lines on a map. It has the format:

    LINE, LineCode[, [LineStyle][, RedValue, GreenValue, BlueValue]]

    Latitude, Longitude, P
    Latitude, Longitude, L

    .
    .
    .

Here is an example of a LINE type of overlay with LineCode = LAKE,

    LINE, LAKE
    44.7333, 61.4500, P
    45.0500, 61.9667, L
    45.0500, 61.7167, L
    .
    .
    .
    44.7333, 61.4500, L
    46.4333, 74.1833, P
    46.7667, 74.6167, L
    46.8500, 75.0667, L
    .
    .
    .

LineCode is used to set default colors and can have the following values:

Country

Code for country boundaries, default color red;

RIVER

Code for rivers, default color blue;

LAKE

Code for lake, default color light blue;

BATHY

Code for bathymetry; default color light cyan;

COREEF

Code for coral reefs, default color white;

ROAD

Code for roads; default color brown;

STATE

Code for state boundaries; default color magenta;

OTHER

For other types of lines with default color yellow;

OTHERxx

For other types of lines where xx is the assigned color; see color codes under POINT type of overlay.

 

Standard FishBase maps use three LINE type overlays:

    COUNTRY3.DAT, LAKE3.DAT and RIVER3.DAT

LineStyle can have the following values:

    0 Solid lines;
    1 Dashed lines;
    2 Dotted lines;
    3 Line with alternating dashes and dots;
    4Line with alternating dashes and double dots.
The POLYGON Overlay

The POLYGON overlay allows the placing of polygons filled with colored patterns on a map.

    POLY, PolyCode[, [PolyPattern] [, RedValue, GreenValue, BlueValue]]
    Latitude, Longitude, P
    Latitude, Longitude, L
    .
    .
    .

Lake can also be defined as a polygon. Below is an example of POLY type of overlay with PolyCode = LAKE. Take note that the last point of a polygon vector is automatically connected to the first (P) point.

    POLY, LAKE
    44.7333,    61.4500,    P
    45.0500,    61.9667,    L
    45.0500,    61.7167,    L
    .
    .
    .
    44.7333,    61.4500,    L
    46.4333,    74.1833,    P
    46.7667,    74.6167,    L
    46.8500,    75.0667,    L
    .
    .
    .
    44.7333,    61.4500,    L

PolyCode is used to set default colors and can have the following values:

LAKE Code for lakes; colored light blue;
COREEF Code for coral reefs, colored white;
OTHER For other types of polygons with default color yellow;
OTHERxx

For other types of polygons where xx is the assigned color; see color codes under POINT type of overlay.

You can use patterns to fill polygons

If PolyPattern value is not specified a solid color will be used to fill up the polygon; otherwise you can specify any of the following patterns:

    0   Horizontal lines;
    1   Vertical lines;
    2   Downward diagonal lines (left to right) at 45 degrees;
    3   Upward diagonal lines (left to right) at 45 degrees;
    4   Horizontal and vertical cross lines;
    5   Cross lines at 45 degrees.
User Files

WinMap supports the following user files: POINTxxx.DAT, LINExxxx.DAT, POLYxxxx.DAT, LABEL.DAT, FILL.DAT and DISTR.DAT, where the string xxxx can consist of any valid characters in naming a file under DOS.

The LABEL.DAT file

All the labels in a map are stored in the LABEL.DAT file. The format for this file is:

    Latitude, Longitude, "Label"[, ["FName"][, [FSize][, [FBold][, [FItalic][, [ColorCode]]]]]]

The user has an option to change the font style. The parameters for changing the font style are:

FName

The default is the ‘System’ font name which can be changed to different Windows fonts (i.e. ‘Arial’, ‘MS Sans Serif’, ‘Times New Roman’);

FSize

The default value is 0 (zero). With 0-value, a reasonable default size is used. Otherwise, specify the desired font size which can be a number between -100 and 100;

FBold

The value is either 1 - for bold characters, or 0 - for regular characters. The default is 1;

FItalic

The value is either 1 - for italicized, or 0 - for regular characters. The default is 0;

ColorCode

Providing a value for color code will change the color of the text. See Table 2 for the list of codes.

 

An example of a label file is:

0.5 10.5   "Test default"
10.0 40.5 "  Test italics red" "Arial", , , 1, 12
-15.5 -100.0 "  Test font size 14" "Arial", 14
 
The FILL.DAT file

The FILL.DAT file provides an option to flood-fill an area with a certain color and pattern. Only pixels that have the same color as and are connected to the starting point will be ‘flooded’. The file has the following format:

    Latitude, Longitude, ColorCode[, FillPattern]
    .
    .
    .

Latitude and Longitude specify the starting point for the flooding. See Tables 1 and 2 for the color codes. For FillPattern, refer to PolyPattern under the POLYGON Overlay section. In adding the FILL.DAT file in the list of overlay files in WINMAP.LST, the previously plotted overlay files will determine the boundaries for the flood-fill.

Here is an example of a FILL.DAT file wherein there are two types of polygon fill. One type of polygon will be filled white solid and the other will be filled with brown crosslines:

0.0, 50.0,   15
-15.0, 30.0,   06, 5
20.0, -90.0,   15
-40.0, -112.0,   06, 5
 
The DISTR.DAT file

The DISTR.DAT file is a special type of a FILL.DAT file that facilitates flood-fill of countries with different colors and patterns. The format is as follows:

    CountryCode, [ColorCode] [, FillPattern]
    .
    .
    .

Country codes follow the UN standard. Below is an example of a DISTR.DAT file which fills countries without color code with the default color (dark green = 02 in color code) and the other countries with the specified color (light green). Codes for other colors are: 04 - red, 05 - magenta, 06 - brown, 08 - dark gray, 10 - light green, 11 - light cyan, 12 - light red, 13 - light magenta, 15 - white. For color codes not in this list, the default color will be assigned. This is to avoid using colors that WinMap already uses for other objects. If FillPattern is not specified, countries will be filled with solid colors. Below is an example of a DISTR.DAT file with the countries 174 and 716 filled with light green:

    174,    10
    818,
    230,
    716,    10
    566,

Like the FILL.DAT file, the DISTR.DAT file uses previous overlays to define the boundaries for filling colors. WinMap assumes that the overlay file listed in WINMAP.LST (see section above) prior to DISTR.DAT is a LINE overlay of COUNTRY type.

 
The LEGEND.DAT file

You can fill the rectangular space below a map with legend information such as symbols and text.

To place legends for the different symbols that were used in the displayed map, include the LEGEND.DAT file in the list of overlays in the WINMAP.LST file. The LEGEND.DAT file follows the format below:

    "SDesc"[, ["FName"][, [FSize][, [FBold][, [FItalic][, [SType][, [SSize][, [SColor][, [SPattern]]]]]]]]]

where

 
Legends can use different fonts, colors, symbols and sizes SDesc

The legend text, enclosed in quotation marks;

  FName

The font name, with default ‘System’ font (see section on the LABEL.DAT file);

  FSize

The font size, default is equal to 0;

  FBold

Has value 0 or 1, where 1 makes fonts bold and is the default value;

  FItalic

Has value 0 or 1, where 1 makes the fonts italicized and 0 is the default value;

  SType

The symbol type with the following values: 0 - no symbol, 1 - filled circle, 2 - unfilled circle, 3 - filled square, 4 - unfilled square, 5 - line;

  SSize

Determines the size of the symbol, expressed in device units. This does not apply to the line type symbol;

  SColor

The color of the symbol. Values range from 0 to 15 (see Table 3);

  SColor

The color of the symbol. Values range from 0 to 15 (see Table 3);

  SPattern

The patterns for different types of symbols. The filled circle and filled square have the same color for the outline and the fill. For the unfilled circle and square, the symbol can be filled with different patterns (0 to 5) or with the background color if the pattern is not specified. See PolyPattern under the POLYGON Overlay section. The line type of symbol can have different line styles (0 to 4), where 0 = solid line is the default. See LineStyle under the LINE Overlay section.

An example of a LEGEND.DAT file is as follows:

    "Map Information"
    "Oreochromis niloticus", "Arial", 14, , 1, 1, 1, 4, 14
    "Reported countries", "Arial", 14, , , 3, 6, 02
    "Introduced countries", "Arial", 14, , , 4, 6, 10, 5

Legend one will be displayed using the ‘System’ font and no symbol. Legend two will be in ‘Arial’, size 14, bold and italicized font type, with symbol yellow filled circle preceding the text. Legend three of the same font type as Legend two, in bold regular characters with a green filled square symbol. Legend four has the same font type as Legend three but with a light green square filled with cross line patterns.

 
WINMAP.INI

Path information for the various types of files needed by WinMap is contained in the WINMAP.INI file, which can be found in the Windows directory (C:\WINDOWS). By default, if WINMAP.INI is not found, all files are searched in the WinMap directory. If you have problems running WinMap, make sure the entries in WINMAP.INI are correct. The format of this file is:

 

[Settings]

 
  ImagePath=<complete path> for .BMP base maps;
 

DataPath=<complete path>

for user files:
POINTxxx.DAT,
LINExxx.DAT,
POLYxxx.DAT,
FILL.DAT, LABEL.DAT,
TEMP files;
 

VectorPath=<complete path>

for ._FL/._FR files, and
other overlay files, e.g.,
COUNTRY3.DAT,
RIVER3.DAT,
LAKE3.DAT;

 

UserMapPath=<completepath

contains all user-defined base maps and overlays.
 

For example, for FishBase running from a CD-ROM in drive E: the settings may be as follows:

    [Settings]
    ImagePath=E:\FB\WINMAP
    VectorPath=E:\FB\WINMAP
    DataPath=C:\FISHBASE
 
Running WinMap

After the necessary files have been created, WINMAP.EXE can be started. WinMap will then read the files specified in WINMAP.LST, and load them from the directories specified in WINMAP.INI and plot the map and overlays. FishBase for example, creates DISTR.DAT and POINT.DAT files through MS Access queries, saves them in C:\FISHBASE, and then calls WinMap with the MS Access command:

    Shell("WINMAP.EXE") .