THE WINMAP SOFTWARE
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:
Latitude, Longitude, P
.
Here is an example of a LINE type of overlay with LineCode = 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:
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]]
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.
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:
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 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:
. . .
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:
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:
"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:
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") . |