T O P O The 3-D Topographic Map Plotting Program Version 3.0 (c) 1993 by Donald A. Burrows User Manual INTRODUCTION This program began as a long time dream to be able to put topographic maps in to my computer so that I could view any region at any scale and from any point of view I desired. It developed as a fairly flexible program that allows one to depict the data not only as more or less traditional colored contour maps (Conic Projection) but also as 3-D oblique views both with color contours and gray-scale shaded relief surfaces. The program is designed to be used in the either 16 or 256 color modes. Two different 256 color modes are implemented, a non-standard 360x480x256 mode which will work on most IBM compatible VGA cards and the standard MCGA 320x200x256. In addition 3, 16 color modes are available, the VGA 640x480x16 mode, as well as the EGA 640x350x16 and 640x200x16 modes. While it will run without a math co-processor, it is highly recommended to have one as otherwise the plotting procedure can be incredibly slow. It's performance on an 12 mHz AT with a math co-processor is adequate, but it runs very nicely on 33MHz 486 machine. The program was intended to be used on a hard disk with the topographic data files on floppy diskettes; however, it can be run with both program and data on floppys or both on the hard disk. The program is designed to work with the 30-second topographic database for the United States and TOPO30 software which can be obtained from U.S. Department of Commerce National Oceanic and Atmospheric Administration National Geophysical Data Center 325 Broadway E/GC1 Boulder, CO 80303 ph (303) 497-6764 fax (303) 497-6513 To use the TOPO30 program to obtain files which can be used with TOPO it is necessary to select undelimited elevations for the output file format and to select meters as the elevation units. In addition to the data file the program also generates an information file marked by the extension .INF which must also be present with the data file in order to read the data into TOPO. GETTING STARTED This section is for those who want to learn the program by doing. Examples will be given showing how to produce several different types of maps. To start follow the directions on the Readme.txt file on the program diskette. If all goes well the following files should be together in the same directory. TOP.BAT TOPO.EXE GETMODE.EXE MHR.SCN VGA.SCN MCGA.SCN EGA.SCN SCD.SCN NEWYORK.T30 NEWYORK.INF If it is assumed that all the files are on the C drive in a directory named TOPO, the program can then be started by entering C:\TOPO > TOP If the program files were on the C drive in dirrectory TOPO and the data files were on floppy diskettes in drive A, then the program could be initiated by entering C:\TOPO> TOP A: You will be given the choice of selecting the graphics mode you want to use. There are 3, 16-color modes and 3, 256-color modes available. The 16-color modes allow the plotting of maps either as color contour maps or as grayscale shaded relief maps, while in the 256-color format all maps depict both color contours and shaded relief. The 360x480 mode is a non-standard mode but will work on most VGA adapters and provides a significant improvement in resolution over the MCGA 320x200 mode. Once the program screen is displayed, then menu selections can be made by either using a mouse and the left mouse button or by the use of the arrow and keys. Menu boxes can be exited by using the key. When it is necessary to enter a number or file name from the keyboard, the key is used to initiate the editing process. After entering the new value a is required. To exit the box there are two possibilities. The key is used to exit without updating the values and is used to exit and save the new values. Note: the mouse will not work in the 360x480, 256 color mode. DISPLAYING AND CREATING MAPS There is one data file provided with TOPO. This can be loaded and viewed and used to create new maps. Start by loading the data file. This contains the elevation data for a given region that is necessary in order to draw any map with TOPO. No map can be created or redrawn without having a data file loaded into memory. To load the data file begin by using the arrow and keys or mouse pointer and left mouse button to select DISPLAY followed by LOAD DATA FILE. To enter the file name press , then type NEWYORK.T30 followed by . If all is working well you should see the message 116644 bytes required If the data file is too large for the available memory the message "Insufficient Memory" will be displayed in the bar at the bottom of the screen. Start by creating a map showing the contents of the entire data file. First select [Type] and [2-D Map]. This specifies a two dimensional conic projection map with standard parallels at 35 and 43 degrees North. Next select the base elevation and contour interval appropriate for the region. Elevations less than the base elevation are not plotted. The contour interval determines the range of elevation over which each color is used. In the 256 color modes there are 11 different colors with 22 shades of each used in addition to the background color. In the 16 color modes there are 15 different colors in addition to the background color. For the New York file a base elevation of 0 feet corresponds to the lowest elevation in the file. Since the highest elevation in the file is less than 2000 feet a contour interval of 150 feet is good for the 256 color modes. In this case any elevation over 10x150 + 0 = 1500 feet will be shown as shades of gray. If a contour interval of 100 feet of is used in a 16 color mode, then any elevation over 14x120 + 00 = 1680 feet will be white. Select [Options] and [Set Contours], push and enter the base elevation followed by . Push again and enter the contour interval followed by . If the values have been entered correctly then push to update to the new values. If is pushed then the menu is exited without updating the contour values. Finally to start the plot select [Display] and [Clear Screen] then [Display] and [Display New Map]. The computer should should be starting to plot a color contour map viewed from directly overhead at a distance that will allow the entire data region to be displayed on the screen. Pressing any key during the plotting will cause the program to stop at the end of the current line. Be careful when you do this however as the program will have to plot all over from the beginning if you restart with [Display] and [Display New Map]. At any time when the menu selector bar is visible, the screen display and the current map selection data can be saved in a disk file by selecting [Display] and [Save Map Display]. The display is saved in a file with the name MAPFILxx.PCX, where xx represents two digits starting with 00 for the first file in the directory and going up to 99. If it is desired to determine the values of the various map parameters associated with it, one need only select the menu choice connected with it and the current value will be displayed. For instance if it is desired to determine the contour interval of the loaded map select [Options] and [Set Contours]. The box should indicate the base elevation and the contour interval. The key can be used to exit without altering the values. If at this point you select [Display] and [Clear Screen] then [Display] and [Display New Map] the previous map will be redrawn since all the map parameters necessary to re-create the map were loaded with the map file. A MAP CAN ONLY BE DRAWN AFTER A DATA FILE HAS BEEN LOADED. A three-dimensional, oblique view of the New York area can be created by selecting [Display], [Set New Region] and then entering and changing the northern boundary to 41.5 degrees, the western boundary to 74.35 degrees and the eastern boundary to 73.15 degrees. Press to update the changes. Then select [Type], [3-D Map], [Options], [Viewpoint]. Change the vertical angle to 75 degrees and the distance to 50 miles and update by pressing . Next select [Options], [Set Solar Angle] and change the azimuth angle to 120 degrees. Now select [Display] and [Display New Map], the computer should then start drawing the new view. When complete this view can be saved as well if desired. DESCRIPTION OF MENU OPTIONS DISPLAY - Under this heading the screen can be cleared, a data file loaded, a current selection plotted, a new map region can be specified, a newly drawn map saved, or a completed map viewed. CLEAR SCREEN - This removes any currently displayed images from the screen. In the black and white mode it can also be used to replace a black background with a white background. LOAD DATA FILE - This will load a data file created by the TOPO30 program using Undelimited Elevations for the output file format with the units in meters. If the file is too large to be loaded into available memory the message "Insufficient Memory" will be displayed. The program at present does not utilize extended or expanded memory and so is limited to the DOS 640K memory. If the computer has at least 640K of DOS memory available with no large TSR programs resident such as network programs then files covering up to about 4.5 square degrees can be accomodated. A file as it is loaded displays the amount of memory required to store it which is less than the size of the file on the disk. It is not recommended to run TOPO under Windows as not only does it take up memory but also it interferes with the fonts for two of the 256 color modes. Note: Whenever TOPO30 is used to create a datafile it leaves a memory resident program behind of about 50 Kbytes. This will limit the maximum size of a data file that can be loaded into TOPO. If you get an insufficient memory message when trying to load a file after using TOPO30, you may be able to correct the condition simply by rebooting and trying again. DISPLAY NEW MAP - This causes a map to be plotted using the currently specified map parameters. SET NEW REGION - Under this heading the northern, southern, western and eastern boundaries of a region to be plotted can be specified. The units are degrees and decimal fractions of degrees. North latitude and West longitude are positive values. SAVE MAP DISPLAY - This is used to save completed maps using the ZSoft PCX format. Files are automatically named beginning with MAPFIL00.PCX up through MAPFIL99.PCX. Files are stored in the directory that the program is located in. LOAD MAP DISPLAY - This is for viewing saved maps. Enter the complete file name including extension. Looks for file only in the same directory as the program is located unless a path is included with the name. TYPE - Under this heading the the type of map can be selected, i.e. contour or shaded, 2-D or 3-D. SHADED (B/W) - This appears only in 16 color modes and specifies a black and white shaded relief type plot. If a black background is desired choose [Clear Screen] before selecting [Shaded (B/W)]. If a white background is desired then choose [Clear Screen] after selecting [Shaded (B/W)]. This also specifies a high contrast mode. A lower contrast mode can be obtained by selecting [Alt Palette] under [Features]. COLOR CONTOUR - This appears only in 16 color modes and specifies a plot using the color contour mode. It also specifies a blue background. Using [Color Contour] and [Alt Palette] one can toggle back and forth between a white background and a blue background. In the 256 color modes all maps use both color contours and shading. 3-D MAP - Draws a map viewing a spherical earth whose topography can be magnified. Adjacent 3-D maps will not quite fit together to make a larger map. 2-D MAP - Shows the projection of a spherical earth onto a smooth conical surface. The cone's point is above the North Pole and the surface of the cone intersects the earth's surface at latitude 43 degrees North and latitude 35 degrees North. The edges of adjacent maps can be made to fit together so that in theory at least, one could print out several smaller maps and fit them together to make a larger map. ABOUT TOPO - Displays version, author and copyright date. OPTIONS - Under this heading a number of different plotting options can be specified, such as selecting an alternate color palette, setting the point from which the map is to be viewed, setting the contour interval, setting the direction of the lighting and drawing a lat-lon grid over the map. ALT PALETTE - In color contour mode this specifies a palette with a white background and a pink max contour color. In black and white mode it specifies a high contrast gray scale with only black, white and a medium gray. A different set of colors is available for the 256 color palette as well. SET VIEWPOINT - This is used to specify the placement of the observer relative to the map. The default azimuth angle is 0 degrees which places north at the top of the map. 90 would place east at the top, 180 - south, and 270 - west. The default vertical angle is 0 degrees which indicates that the map is being viewed from directly overhead. 90 degrees in this case would mean that the observer would be looking at the map horizontaly from sea- level. Distance is specified in miles from a point at sea-level located horizontally in the center of the map. The default value is 155 miles which is a good value for observing a 1 degree by 1 degree region from directly overhead. Entering a distance of 0, will cause the program to autoscale to fit the selected region on the screen assuming that both azimuth angle and vertical angles are also 0. SET CONTOURS - This option is used to specify the altitude from which color contours are computed and the altitude interval between successive colors. In the 16 color mode there are 15 altitude intervals. If the base elevation is 0 (sea-level) and the contour interval is 500 ft. then the background (blue or white) color will indicate all regions of altitude 0; the dark green, altitude 0 to 500; up to white or pink for all regions over 7000 ft. The default value of the base elevation is 0, and the default value for the contour interval is 500 ft. Note: In the topographic data files the elevations are specified to only the nearest 20 feet above sea level, consequently areas that are less than 10 feet above sea level have apparently been rounded off to 0 so that they will be displayed as ocean instead of being displayed as land. As a result many low lying coastal areas may not appear at all. The order of the color contours in the 16 color modes is as follows: Sea Blue / White Dark Green Green Light Green Dark Yellow-Green Light Yellow-Green Yellow Brown Dark Brown Tan Orange Dark Gray Light Gray Light Tan Light Olive White / Pink The colors after the / are the colors found on the alternate palette. For the 256 color modes the order of the color contours is: Reg. Palette Alt. Palette Blue Azure Lt. Cyan Bluish-Green Bluish-Green Lt. Bluish-Green Green Green Lt. Green Yellowish Green Yellowish-Green Greenish-Yellow Greenish-Yellow Yellow Yellow Yellow-Brown Lt. Yellow Brown Lt. Tan Reddish-Tan Tan Tan Gray Gray SET SOLAR ANGLE - This applies to the shaded mode and determines the direction of the lighting relative to the earth. A solar azimuth angle of 0 has the lighting coming from the north, while a value of 90 will have it coming from the east, 180, from the south and 270, from the west. Solar height determines the vertical angle from which the lighting will come. In this case 0 degrees would indicate the sun is on the horizon of the map and 90 would place it directly overhead. Default values are: Solar Azimuth - 240 degrees and Solar Height 34 degrees. MAGNIFY - This allows the vertical scale of the maps to be enhanced. It has no effect of the contour display. Selecting x1 means that there is no vertical exageration i.e. the vertical scale is the same as the horizontal scale. Five different vertical magnifications can be selected. 1.5 times normal, 2 times normal, 3 times normal, 5 times normal and 10 times normal. QUIT - This exits the program. Pressing has the same effect. TO REGISTER You are urged to register your copy of TOPO by sending $25 to Donald A. Burrows 526 Belmont Rd. Grand Forks, ND 58201 Phone: (701) 775-3523 EMail: GENIE: D.BURROWS2 INTERNET: BURROWS@VM1.NODAK.EDU You will receive a copy of the latest update of TOPO which includes support for SVGA, the ability to create index maps for data files, the ability to draw lat-lon grid lines on a map and other improvements. KNOWN BUGS The major known bug in version 3.0 occurs only in the 320x200x256 MCGA mode. The menu selector bar for the secondary menus either does not appear or disappears after certain selections are made. Consequently this mode does not work well without a mouse. This is an inferior mode anyway and the problem does not occur in any of the modes with better resolution. ACKNOWLEDGEMENTS Thanks are due to John Bridges for his VGAKIT version 5.2 making it possible to utilize the nonstandard 360x480x256 graphics mode. The PCX graphics format was developed by the ZSoft Corp. for use with their PC Paintbrush and Paintbrush Plus. The version of the PCX format used is supposed to be compatible with versions 3.0 or greater. --------------------IMPORTANT -- WARRANTY & DISCLAIMER ----------------- TOPO version 3.0 is shareware and you are urged to register. It may be freely distributed provided all the files in TOPOV300.ZIP are included. The author makes NO warranties, expressed or implied as to the quality or the performance of this program. The author will NOT be held liable for any direct, indirect, incidental or consequential damage resulting from the use of this program. Your use of this program constitutes your agreement to this disclaimer and your release of the author from any form of liability or litigation. ----------------------------------------------------------------------------