Date Long time ago (about 1991) By Lars Aronsson FTP lysator.liu.se (130.236.254.1) File pub/geography/wdb2-README The terminology used here is my own. The facts here presented are partly taken from documents that come with Brian Reid's compacted version of WDB II and partly deduced from my own browsing through the map data files. The files called wdb2-something are parts of the World Databank II compiled by USAs Central Intelligence Agency (CIA). The original databank consists of almost six million geographic coordinates and occupies about 130 megabytes of disk in uncompressed form. It is available from the U.S. Government and is in the public domain. The coordinates are connected by lines to form coast contours, islands, lakes (CIL), political boundaries (BDY), and rivers (RIV). The maps cover one continent each and they each consist of three files: cil.dat, bdy.dat, and riv.dat. Each file is structured as a large set of 20 bytes ASCII records (plus one linefeed character per record). The records are grouped to geographic objects each consisting of one head record and a sequence of coordinate records. The head record among other things tell the number of coordinate records to follow. The coordinate records, each containing one geographic coordinate, form the object when connected by straight lines in the sequence given. If a geographic object is supposed to be a closed path, as is the case for island and lake contours, then the first coordinate of that object is also explicitly given as the last coordinate. A head record has the following format: 4114666 1 536 0 aaaaaaabbccccccddddd It consists of a seven digit object identifier field (a), a two digit object type field (b) the meaning of which is different for the three different kinds of files, a six digit field (c) telling the number of following coordinate records, and a five digit field (d) which always contains a zero in head records. The different meanings of the (b) field are: In "Boundary" (BDY) files: 1 Demarcated or delimited boundary 2 Indefinite or in Dispute 3 Other line of separation of sovreignty on land In "Coast, Islands and Lakes" (CIL) files 1 Coast, islands and lakes that appear on all maps 2 Additional major islands and lakes 3 Intermediate islands and lakes 4 Minor islands and lakes 6 Intermittent major lakes 7 Intermittent minor lakes 8 Reefs 9 Salt pans -- major 10 Salt pans -- minor 13 Ice Shelves -- major 14 Ice Shelves -- minor 15 Glaciers In "Rivers" (RIV) files 1 Permanent major rivers 2 Additional major rivers 3 Additional rivers 4 Minor rivers 5 Double lined rivers 6 Intermittent rivers -- major 7 Intermittent rivers -- additional 8 Intermittent rivers -- minor 10 Major canals 11 Canals of lesser importance 12 Canals -- irrigation type Coordinate records (two in sequence given here) have the following format: 175958S 231737E 1 18 011S 231750E 2 eeffgghiiijjkklddddd They consist of a two digit latitude degrees field (e), a two digit latitude minutes field (f), a two digit latitude seconds field (g), a one character ('S' or 'N') latitude direction field (h), a three digit longitude degrees field (i), a two digit longitude minutes field (j), a two digits longitude seconds field (k), a one character ('W' or 'E') longitude direction field (l), and finally a five digit sequence number field (d). The (d) field in the coordinate record has the same position and length as in the head record. The (d) field of the first coordinate record within each geographic object has the value 1 (one). The following coordinate records sequentially count up to and including the value given in the (c) field of the head record. Note that coordinates are given as degrees-minutes-seconds and that the fields (f, g, j, k) therefore will assume values " 0" thru "59". An obvious use of the object identifier field (a) in the head record would be to use as a key to a database lookup for its name (and other interesting data that might be associated with a geographic object). However, I have not found any such names database.