home *** CD-ROM | disk | FTP | other *** search
/ Graphics 16,000 / graphics-16000.iso / amiga / mapping / wdbank.doc < prev    next >
Text File  |  1991-12-22  |  21KB  |  497 lines

  1. Documentation contents:
  2.  
  3.  
  4. INTRODUCTION
  5.  
  6.     Background (MS-DOS)
  7.     Micro WDB II File Composition 
  8.     Disclaimer
  9.  
  10. WORLD DATA BANK II (Amiga) Display Routine, Version 2.2
  11.  
  12.     Overview
  13.     Instructions For WDB
  14.         Running WDB
  15.         Forcing Use of a Single Data File
  16.         Adjusting Aspect Ratio
  17.         Navigating The Display
  18.         Choosing A New Vantage Point
  19.         Known Bugs
  20.     Instructions For SAT
  21.     Instructions For SELECT
  22.     Credits
  23.  
  24.  
  25. _____________________________________________________________________
  26. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  27.  
  28.  
  29.  
  30. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  31. INTRODUCTION
  32. ============
  33. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  34.  
  35.      The following information is from the original MS-DOS
  36.      version of the WDB-II program, written by Fred Pospeschil.
  37.      It explains the background of the CIA derived map data
  38.      for those who are interested (or might have the resources
  39.      to replace the data with something more current).
  40.  
  41.  
  42. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  43.  
  44. The full WDB-II is a digitial map data base produced by the Central
  45. Intelligence Agency (CIA) and distributed by the National Technical
  46. Information Service (NTIS), U.S.  Department of Commerce, 5285 Port
  47. Royal Road, Springfield, VA, 22161.  Micro WDB-II is a highly
  48. compressed version which is suitable for use on micro computers and
  49. was put in this configuration by Micro Doc.  Before describing Micro
  50. WDB-II a few words should be said about the source file - WDB-II.  The
  51. following paragraphs are paraphrased from the NTIS overview of WDB-II.
  52.  
  53.    WDB-II is a digitial representation of the world coastlines
  54.    and boundries suitable for use in automated mapping systems.
  55.    It contains approximately six million discrete geographic
  56.    points and was digitized using all available sources of
  57.    information.  Map scales used range from 1:750,000 to
  58.    1:4,000,000 with a nominal scale of 1:3,000,000.  These points
  59.    are grouped by and identified as describing (1) coast lines,
  60.    (2) country boundries, (3) state boundries (USA only), (4)
  61.    islands, (5) lakes, and (6) rivers.  Each of these groupings
  62.    is further broken down into features and subordinate
  63.    classifications/ranks.  These ranks are hierarchically
  64.    structured, and are also used for plotting symbol definition.
  65.  
  66.    WDB-II, as provided by NTIS, is in a 20 character format
  67.    on five 9 track EBCDIC one-half inch magnetic tapes.  This data
  68.    base consists of two types of records, one for the line segment
  69.    identifier data, and the other for the latitude and longitude
  70.    values of each discrete point making up the line segment.  In
  71.    this format latitude and longitude values are recorded only as
  72.    integers in degrees, minutes, and seconds.  WDB-II is available
  73.    for $660.00 (Order Number PB-271 874 SET/HBG).
  74.  
  75. Clearly, WDB-II is an excellent data source when making large (4 x 6
  76. foot) plots on a mainframe or minicomputer.  It is, however, somewhat
  77. large (150 - 200 megabytes) for use on microcomputers.  Even on the
  78. larger commercial online graphics systems, many points have to be
  79. filtered out before generating displays.  For this reason many people
  80. have spent considerable time over the past to filter and compress this
  81. data into a form which could be used in desktop computers.  To these
  82. people we wish to express our appreciation - particularly Antonio
  83. Riveria who provided us with a copy of the latest download of the
  84. file.
  85.  
  86.  
  87. Background
  88. ==========
  89.  
  90. The present version began as a three megabyte ASCII text file which
  91. contained some 179,000 points selected from all six of the line types
  92. described above.  This file was then converted into a sixteen bit
  93. integer format which reduced the size to just over one megabyte. Since
  94. this was still a little large for most five inch disk formats the file
  95. was divided into six files - one for each of the six line types.  The
  96. coast line file was further divided into two files as it was over 400
  97. KB.  With this processing completed the file was configured such that
  98. it could be readily moved to most desk top microcomputers using the
  99. MSDOS disk format.  The following table provides a brief statistical
  100. overview of the six line types which are contained in the data base.
  101.  
  102.  
  103. Micro WDB-II File Composition
  104. =============================
  105.  
  106.    Detail  COAST  COUNTRY  STATE  ISLAND   LAKE   RIVER   Total
  107.    Level   .PNT   .PNT     .PNT   .PNT     .PNT   .PNT
  108.  
  109.      1     29150     8573    798   13781    5886   11146  69339
  110.      2     35077    10172    959   16077    7080   13217  82599
  111.      3      5470     1496    153    2524    1023    1817  12526
  112.      4      4000     1249    101    1945     820    1254   9502
  113.      5      1478      869    248     844     309     760   5365
  114.    Total   75175    22359   2259   35171   15118   28194 179331
  115.  
  116.    Lines     208      301    111     344     103     196   1263
  117.  
  118.    Size (KB) 449      134     14     211      90     169   1067
  119.  
  120. The above table shows the number of points which are in each file and
  121. for each level of detail.  It also shows the number of line segments
  122. in each file and the file sizes in kilobytes.
  123.  
  124. Detail level 5 contains the fewest points and produces the least
  125. detailed graphics image.  The points at each level of detail are
  126. additive to the points at all lower levels.  For example, when using
  127. detail level 4 the points from both levels 4 and 5 must be used /
  128. retrieved.  Therefore, if one were drawing coast lines at detail level
  129. 4, a total of 5478 (4000 + 1478) points would be processed. These 5487
  130. points will describe 208 line segments of various lengths.
  131.  
  132.     [NOTE: For the Amiga version, the structure of the data
  133.     as described above has been altered.  Detail level 1 now
  134.     incorporates all data from the lower levels.  It also
  135.     combines data from each of the six groups into a single
  136.     file.  Lower detail level files are subsets of the detail
  137.     level 1 file, and similarly incorporate all data from
  138.     levels below them.  The statistical distribution of the
  139.     data points otherwise remains as described.]
  140.  
  141. Note that the same number of line segments exist at all levels of
  142. detail.  For example, regardless of which level of detail is selected,
  143. there will always be 208 line segments described by the coast line
  144. data file.  In some cases, mostly in the islands file, line segments
  145. degenerate to single points at the lower levels of detail.  Therefore,
  146. programs which process this data must check to see whether each line
  147. segment header record is followed by a point record or another line
  148. segment record.  More will be said about this later.
  149.  
  150. Actual use of the data in these files has shown that most displays
  151. which cover a reasonably large area do not need all of the detail
  152. provided at level 1.  A large area would be a major portion of the
  153. U.S.  For large area plots level 3 or 4 is normally sufficient and
  154. greatly reduces the number of points which must be processed.
  155.  
  156.  
  157. Disclaimer
  158. ==========
  159.  
  160. This product contains/uses data and/or code placed in the public
  161. domain by Fred Pospeschil and Antonio Riveria.  Original coordinate
  162. data was created by the Central Intelligence Agency.
  163.  
  164. ALL USERS OF THESE MATERIALS ARE TOTALLY RESPONSIBLE FOR THEIR USE AS
  165. THESE MATERIALS ARE PROVIDED WITHOUT EITHER EXPRESS OR IMPLIED
  166. WARRANTIES OF ANY KIND.
  167.  
  168. For information related to the original MS-DOS version only:
  169.  
  170.     Fred Pospeschil
  171.     3108 Jackson St.
  172.     Bellevue, NE 68005
  173.     402-291-0795  (6-9 PM Central)
  174.  
  175. _____________________________________________________________________
  176. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  177.  
  178.  
  179. WORLD DATA BANK (Amiga) Display Routine, Version 2.2
  180.  
  181.  
  182.  
  183. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  184. OVERVIEW
  185. ========
  186. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  187.  
  188. This program displays the CIA database of the geography of the world. 
  189. The executable file is under 11K, and its takes about 137K to execute,
  190. including hi-res interlace screen and intuition interface.
  191.  
  192. Features:
  193.  
  194.     ╖  Slider gadgets for adjusting latitude, longitude and
  195.        magnification factors
  196.     ╖  Integer arithmetic for scaling, hence faster calcs
  197.     ╖  Area clipping to avoid spending time plotting off-map points
  198.     ╖  Compensation for monitor "stretch" (aspect ratio distortion)
  199.     ╖  Automatic centering of next display from any point in current
  200.        display
  201.     ╖  Choice of cylindrical or spherical projection
  202.  
  203. The files in this set are described as follows:
  204.  
  205. LEVIATHAN.LHA   --   This enormous archive conatins the master 1.1 Meg
  206.         data file for use with both the WDB and SAT display programs.
  207.         The Big File, WDB.1.ALL, contains the data points in all six
  208.         groups described above.  It can be broken down by the SELECT
  209.         program into four smaller subsets named WDB.2 through 5.ALL.
  210.         (WDB.5.ALL has also been provided separately to allow you to
  211.         run the program without extracting this archive).  These
  212.         smaller data files also will contain data from all six groups,
  213.         but provide correspondingly faster drawing and less detail.
  214.         The WDB.5.ALL subset furnished is the smallest, fastest, and
  215.         least detailed.
  216.  
  217. SAT   --   This executable program draws a spherical view of the Earth
  218.         from a fixed altitude approximating 30,000 miles.  It uses the
  219.         WDB.5.ALL data file (the smallest, with least detail).  The
  220.         latitude and longitude of your vantage point are adjustable.
  221.  
  222. SAT8   --   This is a special version of the SAT program above for use
  223.         ONLY ON MACHINES EQUIPPED WITH A MATH CO-PROCESSOR.  *WARNING!*
  224.         This program *WILL CRASH* if run on a machine not so equipped.
  225.  
  226. SELECT   --   This program may be used to create one or more of the
  227.         four data files which are subsets of The Big File.
  228.  
  229. WDB   --   The World Data Bank executable program draws a cylindrical
  230.         projection of the Earth.  Your vantage point is adjustable in
  231.         latitude, longitude, and "altitude" (magnification factor).
  232.         WDB automatically chooses one of the five data files to use
  233.         based upon the magnification factor selected.
  234.         
  235. Other files   --   Also included are icons for Workbench executable
  236.         programs (WDB.info, SAT.info), along with smaller alternate
  237.         icons for each (WDB.alt.inf, SAT.alt.inf).  To use the alter-
  238.         nate set of icons, simply delete WDB.info and SAT.info from a
  239.         CLI, then rename WDB.alt.inf as WDB.info and SAT.alt.inf as
  240.         SAT.info.
  241.  
  242.  
  243. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  244. INSTRUCTIONS FOR WDB
  245. ====================
  246. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  247.  
  248. You may run WDB or SAT using the smallest (least detailed) data file
  249. right now simply by clicking on either icon.  If you wish to see
  250. greater detail you'll need to dissolve the LEVIATHAN.LHA archive,
  251. placing the resulting WDB.1.ALL file in the same directory as the WDB
  252. and SAT programs.  As explained below, you will probably want to use
  253. the SELECT program to create the intermediate data files between The
  254. Big File and WDB.5.ALL, but it's not necessary, especially if disk
  255. space is too tight to waste on redundant data.
  256.  
  257.  
  258. Running WDB
  259. ===========
  260.  
  261. To call it from CLI, type:  WDB <optional data file name>
  262. To call it from Workbench:  double click on the WDB icon
  263.  
  264.  
  265. WDB Automatically selects the input file based on the magnification
  266. factor chosen according to the following scale:
  267.  
  268.     mag  0.85 -   2.00   --> wdb.5.all   (   25,890 bytes) 
  269.     mag  2.00 -   6.00   --> wdb.4.all   (   82,080 bytes)
  270.     mag  6.00 -  12.00   --> wdb.3.all   (  156,960 bytes)
  271.     mag 12.00 -  36.00   --> wdb.2.all   (  652,428 bytes)
  272.     mag 36.00 - 125.00   --> wdb.1.all   (1,068,408 bytes)
  273.  
  274. The name of the file being shown appears in the lower right of the
  275. Control Window.  If the automatically selected file is not available
  276. in the current directory, the next most accurate file (lower numbered
  277. file) available is used.  Note that the size of the file and the
  278. detail available for display increases for *lower numbered* files.
  279.  
  280. Using various files allows for displays of greater magnification to
  281. maintain better detail without the time penalty of passing through the
  282. largest file for displays which require lesser detail. Perhaps someone
  283. will have some better ideas for correlating the magnification scale to
  284. the different data files.  Speak up!
  285.  
  286.  
  287. Forcing Use of a Single Data File
  288. =================================
  289.  
  290. From CLI, specifying a datafile on the command line will cause WDB to
  291. supress automatic file selection, instead using only the file
  292. specified.  For example, "WDB  WDB.3.ALL" will display only points
  293. from the file WDB.3.ALL.
  294.  
  295.  
  296. Adjusting Aspect Ratio
  297. ======================
  298.  
  299. There is a Distortion Comp(ensation) factor control designed to
  300. compensate for monitor "stretch" that will be different for different
  301. monitors.  The program defaults to a value of 1.2, figured at the
  302. equator, which seems to work best with the 1080 monitor.  It may
  303. require some experimentation to find a setting that produces
  304. acceptable results with other monitors.  Try looking at the shape of
  305. Africa on a good globe and adjust the value in the Distortion Comp
  306. text gadget until the shape of Africa on screen approximates that of
  307. the globe.
  308.  
  309.  
  310. Navigating The Display
  311. ======================
  312.  
  313. Using one of the available data files, WDB draws a cylindrical
  314. projection of the world's coastlines, political boundaries (including
  315. states in the U.S.), islands, rivers, and lakes.  The default vantage
  316. point is at the junction of the equator and the Greenwich meridian.
  317. A default magnification factor of 1.0 provides a projection of the
  318. entire globe.
  319.  
  320. On screen is a control panel offering an intuitive set of controls. 
  321. They include both text gadgets and sliders for selection of the
  322. longitude and latitude in degrees and minutes, and the "altitude"
  323. (magnification factor) of your vantage point over the earth.  You may
  324. adjust the sliders to an approximate value, or enter a precise value
  325. in the text gadgets from the keyboard.  Menu items allow you to
  326. hide/show the menu bar and remove/restore the control panel for screen
  327. captures.  The PLOT button draws a screen according to the control
  328. panel settings; the QUIT button quits the program.  A drag bar on the
  329. control panel allows it to be moved to a different location on screen.
  330.  
  331. Maps are drawn with colors which indicate the class of data points to
  332. which they belong.  Continental coastlines are dark green, islands are
  333. bright green, rivers and lakes are dark and light blue, respecively,
  334. major political boundaries are red and minor ones (states) are yellow.
  335.  
  336. At greater magnifications, and especially with the more detailed data
  337. files, the program may at times appear to halt momentarily.  This is
  338. normal, as the program clips data which falls out of bounds of the
  339. window displayed on screen.  When drawing is concluded the control
  340. window will reappear.
  341.  
  342. If you end up with a completely black screen when the control panel
  343. reappears, you've chanced upon a section of the globe which is
  344. entirely devoid of features, such as an ocean.  To regain your
  345. bearings, reduce the magnification factor and replot.
  346.  
  347.  
  348. Choosing A New Vantage Point
  349. ============================
  350.  
  351. If you haven't a clue to the latitude and longitude of a location
  352. you'd like to examine, WDB has a feature which allows you to select a
  353. point on the current display with a click of the Left Mouse Button.
  354. This will set both the longitude and latitude to that point, which
  355. becomes the vantage point for the next display.  To avoid having a
  356. desired vantage point end up off the screen, you should make the
  357. selection of your target vantage point before experimenting with
  358. greater magnification factors.  [See "Known Bugs"]
  359.  
  360.  
  361. Known Bugs
  362. ==========
  363.  
  364. I've noticed that when the magnification factor is low (around 1.0 -
  365. 3.0), the mouse pointer location does not convert very accurately into
  366. longitude and latitude.  I'm not sure why.  Perhaps rounding. (??) 
  367. The WDB program uses integer arithmetic (i.e., fixed-point math) to
  368. gain speed.  This introduces rounding.
  369.  
  370.  
  371.  
  372. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  373. INSTRUCTIONS FOR SAT
  374. ====================
  375. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  376.  
  377. This program displays a single data file as a two-dimensional
  378. projection of a sphere.  Unlike WDB, SAT's "altitude" is fixed at
  379. around 30,000 miles.  Therefore SAT does not use multiple data files.
  380. In this version the program expects to read the smallest, fastest, and
  381. least detailed data file (WDB.5.ALL) since not much detail is visible
  382. at this altitude.
  383.  
  384. Slider gadgets allow you to change the coordinates of the nearest 
  385. visual point of the sphere (your vantage point).  The vertical slider
  386. adjusts latitude; the  horizontal one is for longitude.  You may also
  387. choose to enter a specific number (in degrees) directly via the text
  388. gadgets.  In this version, SAT does not allow the selection of
  389. latitude and longitude coordinates from the mouse pointer.
  390.  
  391. There are two versions of this program:
  392.  
  393.     SAT  -  the regular version
  394.     SAT8 -  a special version for those with M68881 math co-processors.
  395.  
  396.     NOTE:  DO NOT ATTEMPT TO RUN SAT8 IF YOUR SYSTEM IS NOT EQUIPPED
  397.            WITH A 68881 MATH CO-PROCESSOR OR A CRASH WILL OCCUR.
  398.  
  399. Both programs use the same data files as WDB, although in the current
  400. version, both look for a file called "WDB.5.ALL".  If you prefer to
  401. view more detail (and can afford the wait) you may spoof the program
  402. into using a different data file by renaming it as WDB.5.ALL.  Simply
  403. copy one of the more detailed (lower numbered) files to a different
  404. directory under the name of "WDB.5.ALL" and run SAT from that
  405. directory.
  406.  
  407. For example, if you have the SAT program on df0:, type in a CLI:
  408.  
  409.     cd ram:
  410.     copy df0:wdb.4.all ram:wdb.5.all
  411.     df0:sat
  412.  
  413. SAT has many more calculations to complete than does WDB to plot a
  414. map, hence it takes quite a bit more time.  Here, too, the display may
  415. appear to halt for a period during the drawing process.  This is
  416. normal.  When drawing is completed, the control panel will reappear on
  417. screen.
  418.  
  419.  
  420.  
  421. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  422. INSTRUCTIONS FOR SELECT
  423. =======================
  424. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  425.  
  426. The SELECT program is used to extract lower level data segments from a
  427. higher level data file.  This program enables us to put the entire WDB
  428. collection on one disk.  The price to be paid is that you must extract
  429. the files named WDB.2.ALL, WDB.3.ALL and WDB.4.ALL from The Big File
  430. yourself (if you intend to use them).  Note that it's not manadtory to
  431. extract these files; both WDB and SAT will work with any single data
  432. file or any combination (be sure to read the Instructions For SAT). 
  433. By choosing not to extract the three intermediate files you'll lose
  434. only the speed advantage gained by not sifting through The Big File
  435. for low and medium magnification viewing.
  436.  
  437. All four lower level data files (WDB.2 through .5.ALL) are merely
  438. subsets of The Big File, and SELECT can extract any one of them
  439. directly from it.  Similarly, each lower level file is a subset of all
  440. higher level files, and SELECT can extract any lower level from any
  441. higher level file.  Here, as elsewhere in this document, "lower level"
  442. refers to filenames which are numerically HIGHER.
  443.  
  444.  
  445. To use SELECT from the CLI:  SELECT <sourcefile> <destfile> <level #>
  446.  
  447. The level number of the source file must be numerically lower than the
  448. level number requested for the new file.  The program will copy from
  449. the source file to the destination file only the records with a level
  450. number greater than or equal to the requested level number.
  451.  
  452. For example, to create WDB.4.ALL from The Big File enter:
  453.  
  454.    SELECT  WDB.1.ALL  WDB.4.ALL  4
  455.  
  456.  
  457.  
  458. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  459. CREDITS
  460. =======
  461. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  462.  
  463. The program is the work of
  464.  
  465.     Mike Groshart:    basic design; porting from Pascal
  466.     Bob Dufford:      intuition interface; speed optimization
  467.  
  468. Send us further suggestions and bugs to be fixed in care of:
  469.  
  470.     Amiga Users of the Heartlands
  471.     P.O.Box 1432, DTS
  472.     Omaha, NE.  68101
  473.  
  474. E-mail:
  475.  
  476.     Larry's Hot Tub: 402-571-4316  [1:285/15.0@fidonet]
  477.  
  478. Internet:
  479.  
  480.     mike.groshart@auoh.omahug.org
  481.     bob.dufford@auoh.omahug.org
  482.  
  483. Or route a message through Portal or BIX ID: cletus
  484.  
  485.  
  486.  
  487. World Data Bank II for the Amiga, version 2.2 by Bob Dufford and
  488. Michael Groshart.  This product uses data and code originally placed
  489. in the public domain by Fred Pospeschil and Antonio Riveria.  Original
  490. coordinate data was created by the Central Intelligence Agency.
  491. Your tax dollars at work.
  492.  
  493. Anyone with access to a more recent version of the coordinate data
  494. is welcome to provide it; a lot has happened to the world's political
  495. boundaries since this was first released.    :-7
  496.  
  497.