MAPMAKIN.TXT ALL ABOUT MAKING MAPS =========================================================================== Document version: 8.3.4 Document dated: 10 Mar 99 Author(s): Bob Bruninga, WB4APR ABSTRACT MAPMAKIN.TXT All about making maps. The works. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ NOTE: There are several other README\MAP files: MAPS.txt gives an overview and info on where to find maps MAPS-CD.txt tells how to make maps from the USGS CD ROMS MAPS-HST.txt tells you how to make maps simply by driving around and saving a track history! OVERVIEW: My general philosophy is to keep maps simple so that APRS will run quickly on any PC machine, including 8088 laptops. TO minimize RAM usage and to speed up map drawing, APRSdos limits the number of points to 2999 and the number of labels to 199; any more detail on one map just clutters the screen. This does NOT limit overall map resolution, however, since APRS can overlay maps of increasing resolution as you zoom in. METHODS FOR MAKING APRS MAPS There are several methods for making maps depending on the resources available to the user. MANUAL - Ruler and Pencil method. Just use a pencil and home-made template to determine X,Y offsets from the origin in the upper left corner of the map. Then use a DOS editor to enter the X,Y values into a map file. Or use the cursor in MAPFIX to free-hand a map. GPS REPLAY - Just drive around with your GPS, saving APRS track history files. Whenever you want to save a particular point or intersection, press F8. Then use MAPFIX to overlay these histories onto the screen for easy cursor drawing. Or use the GPStoHST.bas file to convert an existing NMEA data file to APRS track history format. CD ROM - Use MAKEMAP1.EXE to build a 32 mile map (or up to 50 mile in rural areas) directly from the single 2,000,000:1 USGS CD that covers the whole US. See MAPS-CD.txt Use MK100K3.EXE to build 2 and 4 mile maps directly from the $32 USGS 100k CD rom for your area. See MK100K3.txt. ******** THIS WILL GIVE YOU EVERY STREET DETAIL! ******** INTERNET - Download the files from the USGS internet sites and use the MAKEMAP1.EXE and MK100K3.exe the same as for the CD. AUTOCAD - Jim Krist KG8GE developed a program to use AUTOCAD to make APRS maps named PLT2MAP and permits you to use a CAD plotter to make AUTOCAD maps and then convert them to APRS. Registered copies of his software can be obtained for $25 from him at 315 Hane Ave, Marion, Ohi0, 43302. DIGITIZER - MAPFIX can accept input from a digitizer tablet. This IMPORTING - This feature in MAPFIX lets you import into your current map, all or a selected category of features from other maps. GENERAL CAUTION: APRS maps are NOT intended, nor expected to fulfill all map requirements but to simply help locate radio equipped mobiles within their 20 or so mile radio range. While driving along at 55 MPH and 30 second GPS updates, zooming in below about 8 miles makes the map move so rapidly so that fine detail is not needed. Often, a straight line between intersections is just as effective as a very detailed curvy map but only takes 2 points vice 20! So concentrate on plotting the intersections accurately; you can fill in curves later. HOW TO MAKE APRS MAP FILES: To see what maps are available to the system, use the MAPS-BORDERS command discribed above. If your local APRS net does not have at least a 64 mile map, please contact me. OVERALL APRSdos NORMAL MAP FILE FORMAT: The first 8 lines of any mapfile define the origin and scale. Comment text is permitted on these first 8 lines after the initial data value and a comma. See any map file as an example. The remainder of the file just lists X,Y points that form the map features such as roads and rivers. To end each such feature and begin another, APRS uses a 0,0 entry. The next feature begins with the value of the line color, followed by the feature name. At the end of this file, is a 0,-1 which marks the end of points data, and the beginning of the list of map labels. Then there is a 0,comment line that starts the LABELS section. Use a DOS EDITOR to look at ANY APRS map file. COMPRESSED FORMAT: In 1995 I added the compressed format which simply converts pairs of X,Y values to 3 ascii characters. The X value uses 11 bits and the Y value uses 10 bits out of the possible 24 so that only printable ascii characters result. THis limits X and Y values to 0 to 3600 and 0 to 1800 respectfully... but saved about 50% in size and file loading time. The resulting 3 character string is abc where the letter c represents .xxxxyyy or the least significant bits in the X and Y values. Thus you uncompress by letting X =16*a + xxxx and Y = 8*b + yyy. But the characters abc were all shifted up to printable ASCII by adding 27 to them, so you should first convert abc to ASCII, then subtract 27 from each character, and use those values for the decompression. LINEFORMAT: THen in 1997, inspired by a comment from George Hadley, I eliminated the CR/LF characters between every single value, further reducing file size and loading time by another 30% or so. The LINEFORMAT also throws away the feature names which were only included in the original format for manual editing. Once you convert a map to LINEFORMAT you cannot recover the feature names. You may use MAPFIX to load and resave a file in any of the three formats. APRSdos will read all formats equally. MANUAL DOS TEXT EDITOR METHOD: Simply use a DOS editor to make a list of points for APRS to use in drawing line segments. Use any chart with lat/long references and select an origin beyond the upper left hand corner of the area you want to cover. That point is 0,0 and all points are measured from there. An X value of 0 is not permitted since it is used to indicate separations between the end of one feature and start of another. MAP SCALE: Next choose an appropriate scale in points-per-degree of LAT/LONG for the area. For example, 120 points per degree gives 2 points per minute (or about half mile resolution) which is fine for large state maps. It takes 1200 PPD or more in order to resolve city streets to the nearest 250 feet. If you use too fine of a scale then you are limited as to how far the map can extend. Points should be limited to 0 to 1024 in Y and 2048 in X so the map can be saved in the compressed formats. MAP RANGE: Since APRS handles range scales as integer powers of 2, I suggest making most maps about 10% larger than any given power of 2. This is so that you can place the cursor near the center of the map, and pretty much see all of it at once. To make it easy to find map centers, APRS shows them with a small Plus mark (+). MAPLIST.xxx: This file contains the list of all map files available to APRS and decides which map is loaded based on the location of the cursor. The first 3 lines of the file also contain the default LAT/LONG and Range for the first map loaded. The program uses this default to center the first map each time the program starts up (center of USA). These values are ignored when a backup file is loaded using the FILES-LOAD command, or when a registered user has saved his default location in his CONFIG file. The MAPLIST.xxx default location is also stored in the #1 MAP HOT KEY so that you can instantly zoom out to the default map for that list with a single key stroke. ADDING MAPS: To add a map to your system, look at the MAPLIST.xxx file. It contains a list of all maps useable by the system. There can be multiple MAPLIST.xxx files. The MAPLIST.USA file comes with the APRS distribution and contains all regional, and state maps, plus some representative local maps. You can either add your map to this file, or add it to any local state lists that might be available. Currently there are complete MAPLIST.xxx map files for many states and countries. To add a map, simply add a line that contains the MAPname, LAT, LONG, MAPrange, and comments. The LAT/LONG are in decimal degrees and describe the center of your map. The MAPrange tells the system to load this map if the cursor falls within this range of the center. Actually it is a little more complicated. The given map will not be used until the cursor location plus the current range scale in all directions fully falls within the boundaries. Currently APRS can only use 170 maps in MAPLIST.xxx. To make room for new maps, but keep old ones handy for later use, You can place a (*) at the beginning of a line to tell APRS to skip that map. Also you can add some comment lines at the designated space in the file (beginning with *) and for each map so that you can keep track of your maps. If you have no comments for a map, you MUST place a comma at the end of the line. MAP HIERARCHY: It is important to place maps in decending order. The last map in the list that contains the given cursor position will be used. If a larger map covering the same area as a smaller map follows it later in the list, then the larger map will always be found last and will be used, instead of the desired smaller map. You can see the this effect, by using the MAPS-HIERARCHY command. If maps overlap in your area, use the MAP-ALT command to temporarily see the map beneath the present map. You can also use the MAPS-OVERLAY command to overlay the larger map onto the present map. Using this feature, you could make two maps of the same area and scale. On one you could put rivers and roads, on the other you could put counties, property lines, and grids. Then by listing the gridded map first in the MAPLIST.xxx file, it would always be superceeded by the road map, but could be summoned up by hitting the MAPS-ALT or MAPS-OVERLAY command! MAP FEATURES: APRS displays all map features by drawing lines from point-to-point. Each feature begins with 0,0 followed by the line color and a name for the feature, followed by pairs of x,y points using the scale you chose. The feature name is not used, but is useful for identification during editing. In APRS, there is no limit on the number of features, But the total number of points must remain below 2999. The MAPFIX.BAS program does, however, have a finite limit during map editing (currently about 150). The POINT values are positive to the right and down. The end of a feature is simply the 0,0 which starts a new one. After the last feature, there is a special 0,-1 which indicates the end of all feature information and the beginning of the labels list. MAP COLORS: APRS recognizes certain map colors for turning on and off map features. It typically uses most of the brighter colors. You can change the background color with the Tint command or dim all colors using the MAPS-FEATURES-DIM command. Map colors are automatically dimmed when you ask for a MAPS-BORDERS display so that map edges show up brightly. Here are my standard colors. The * indicates that the color is uniquely recognized by the APRS FEATURES command: 0 - Black (normal background) * 8 - dark gray (Railroads) 1 - dim blue (ferrys, etc) 9 - Bright Blue 2 - dim grn (Admin areas, Parks) *10 - Bright Green (Interstates) *3 - dim cyan (Rivers) *11 - Bright Cyan (Big rivers, Coasts) 4 - deep red (state roads) *12 - Bright Red (major roads) 5 - dim violet (custom features) 13 - Bright Violet(special events) *6 - dim orange (state/cnty lines) 14 - Bright Yellow (Cities,airports) *7 - gray (back roads) 15 - Bright White (Labels and CALLS) MAP LABELS: Labels are listed at the end of each map file (up to 199). Each label has a LAT/LONG and a range scale. The range limits the number of labels displayed at larger ranges, and displays more as you zoom in. The first line in the labels list has a leading 0 and then any any comments. From then on to the end of the file, each line consists of 4 fields separated by commas. First is the label text (up to 12 characters long) followed by the LAT, LONG and RANGE. LAT and LONG must be given in decimal degrees. The MAPFIX.bas program displays the location of the cursor in decimal degrees for this purpose. Labels are right justified so that they do not overprint station callsigns which are all left justified. Since absolute LAT/LONG reference is used, labels can be transferred without any change to any scale map. Please note, however, that labels are printed on the normal EGA screen 24 line raster, so they can be off their exact location by almost a full text line vertically, and one full character horizontally at higher scales. You can also build APRS symbols directly into MAPS by making the first three characters of the label be a $ followed by the symbol character, followed by a hexidecimal color from 1 to F. The remaining 8 characters can be used for a conventional label at the same location. For example, look at the VORTAC's (aircraft nav aids) that I added to the ALASKA maps. They are listed in the map file as $VEANC,lat,long,rng. Here ANC is the label for the ANChorage VORTAC as it will appear on the map. You can use the alternate tableof icons by using #\ instead of $. MANUAL TECHNIQUE: Once you have chosen an origin in the upper left hand corner of your map, all map values will be measured from that point. I often prepared a template which matches the size of one square of LAT/LONG lines with a finer grid of lines every 10 pixels sketched in. Then it was easy to eyeball interpolate points within each grid on the template which represents a 10x10 pixel area. Use a text editor to add these numeric values into the map file. CAUTION: since many highway maps are Lambert Conformal instead of Mercator projections, use the center square in your map for making the template to minimize errors. Further, be careful of highway maps that only have tick marks along the borders for LAT/LONG. If the map is not a Mercator projection, then you cannot just draw a straight line from left to right connecting latitude marks. Longitude lines are straight on a Lambert Conformal, but not latitude lines! CUSTOMIZING TO YOUR AREA: One way to begin customizing maps to your area is to take one of the existing maps and add roads and features in your area. Since all APRS maps are limited to 2999 data points, however, many are already just about full. The following sections describe how to spawn maps and convert points from one map to another so you will have room to add your own detail using the very powerful MAPFIX23.EXE program. MAP EDITING USING MAPFIX23.BAS/exe: Using this program, you can do just about anything to a map, adding, deleting, moving points. Importing points from one map to another, etc. 0------------------ 0--------------------- 0------------ | | | | ---------- | | | 0----- | | * | | | MAP C | | | | | | | | | ----------- | | | ----------- | --------| | | MAP B | | | | | * | MAP D | | * | | | |*| | | | | | | | | | | | --|------- | | | | *| | | | | | | | |--------|--| | | | MAP A | | ----------- | |---------| | | | | | ------------------- ---------------------- ------ NEW CENTER & RANGE MAP SPAWNING/CONVERSION MAP IMPORTING MAP SPAWNING: In the figure above, map A is the original map with the origin at 0. Using 120 pixels-per-degree resolution, all points within a square area 8 degrees on a side (about 400 miles) can be resolved with pairs of 3 digit numbers. As the number of points in such a regional area map fills up towards the 2999 limit, it is necessary to start new smaller area maps such as B, C, and D above to make more room. Spawning a new map using MAPFIX.bas is easy. Simply use the CHANGE-CENTER and CHANGE-RANGE commands to re-draw the white map border to the location you want, then use the TASK-TRIM command to remove all points outside of that area. Next use the CHANGE-ORIGIN command to change the origin closer to the new upper left corner and give a new scale to permit higher resolution. Finally, begin adding more finer detail using what ever technique you intend to use. Then save the new map and add its name to the MAPLIST.xxx file. IMPORTING AND COMBINING MAPS: The TASK-IMPORT command will import all points of a selected category of features from other maps into the current map. This can be used to build large maps from small ones, or to build new maps from pieces of other ones. See MAP D above. In this process, all points from the selected map that fit within the WHITE border of the current map, are imported. For each pass, you specify the source map, and what category of features to import. Select the category by the color number; 6 for boundary lines, 10 for interstates, 11 for coastline, etc. Conversion of the data to the new ORIGIN and scale are automatic. For more information see MAPFIX.txt