|
|
||||
Creating Multi-Segment Raster Topo Maps with MOAGUAuthor: John Hollenberg | Last updated February 8th, 2009 at 09:41pm IntroductionMOAGU (Mother of All GPS Utilities) is a program written by Leszek Pawlowicz to create raster maps for Garmin GPS units. The FAQ on the web site will answer most questions about the advantages and disadvantages of MOAGU maps. He also has a web site called Free Geography Tools which has some useful and interesting articles. There is also a review of MOAGU on gpstracklog.com. Unlike the vector maps generally available for GPS units, the raster maps are an exact copy of a scanned map, including all symbols, text, etc. which is present on the original map. This also means that as you zoom in the map can get blurry whereas in a vector map it will always be smooth. To speed drawing time, Leszek has the program change the green areas on topo maps representing commercially valuable timber to white, but in all other respects they are identical. This makes identifying your location on a paper topo map very easy. I was interested in the program primarily to produce topo maps to be used during cross-country hikes. This tutorial assumes that you have purchased MOAGU ($20 introductory price) and are able to create a MOAGU map following the very clear directions in the documentation. A limitation of MOAGU is that it can only handle maps of about 100 megapixels (roughly 10,000 by 10,000 pixels). This tutorial documents my experiences in creating a much larger map with MOAGU consisting of 27 MOAGU maps covering Joshua Tree National Park and surrounding areas (available for download here on gpsfiledepot). The 1.3 GB size of the final map takes some time to load (30-45 seconds or so) when you turn the GPS on, and drawing a map screen when you pan takes 10-30 seconds (depending on the amount of detail on that part of the topo) on my Garmin Vista Hcx. For hiking, the occasional redraws are not a problem. Another limitation of the raster maps created with MOAGU is that when zooming in very rapidly my Garmin occasionally crashed (3 times during an all day hike). This caused no harm to the Garmin or the data I was recording. Leszek has seen this also. Presumably it is due to a subtle bug in the Garmin firmware. I'm not sure whether it has been reported, but I doubt Garmin would be interested in fixing a bug that would potentially decrease sales of their own maps. The workaround is simple--don't zoom immediately after zooming. The problem usually happened when zooming a split second after the previous zoom. I found that holding the zoom button down until close to the 500 foot zoom level didn't create the problem, so I could easily and quickly get to the approximate zoom level I needed. Plan Your Map SegmentsI wanted to make the MOAGU segments as large as possible, to avoid having to download too many separate pieces, and because extra work is needed to make the segments fit together well. One complication for my particular topo is that it included data from both the California and non-California databases on the USGS seamless server (odd, since the entire map is in California). I asked the USGS about why the “seamless” database isn't seamless and got the following answer: “There is a discrepancy between the two layers. When in download, you will need to select both the 24k DRG Zone 11 as well as the 24k DRG (CA) Zone 11. The reason for this, is because there is a slight color variation between the two layers. They came from different sources and could not be seamlessly integrated.”
Note that once the geoTIFF files downloaded from the USGS server are re-projected by MOAGU, they will increase somewhat in size. For example, an 80 megapixel file was just over 100 megapixels once re-projected (the _geo.tif file created by MOAGU) from the NAD27 datum to the WGS84 datum. While this made a couple of my pieces slightly larger than 100 megapixels, this isn't a hard and fast limit, and MOAGU processed them just fine, after giving me a warning and asking whether to proceed. Download The DataI found the data download section of the USGS seamless server a bit confusing at first, so I am going to give a few suggestions about how to use it most effectively for downloading scanned 1:24000 topos.
Re-Project The DataIn MOAGU, load each TIFF file using the “Load GeoTiff” button. This will create a geoTIFF that has been reprojected to WGS84 datum, and is named, for example, JT_1_geo.tif. It will also create a World file (e.g., JT_1_geo.tfw), which has the information about the geographic coordinates for the file. Prepare The Files For Clean JoinsThis is where the largest amount of work has to be put in. When the GeoTIFF files are re-projected to the WGS84 datum, the file size is enlarged some, and there are roughly triangular shaped black areas around the edge of the _geo.tif file: In order to create a good join, this area needs to be filled with white (the background color for MOAGU). If you don't do this, the black area will mar a portion of the adjoining segment. Unfortunately, the only way I was able to do this involved a moderate amount of Photoshop work (about 20 minutes per segment). At first glance, it appears you can just select the Paint Bucket Tool in Photoshop and set the foreground color to white. However, if you do this the black lines on the map that connect to the black edge area will be turned white and erased. Thus, before you use the Paint Bucket, you have to block off all of the black areas that connect to the black edge using a white rectangle. Here is the method I used to do this most efficiently:
See an example below: Create Batch Files To ProcessOnce you have finished the previous step, you need to have MOAGU create the batch files that will be used by cgsmapper to make the individual IMG file tiles. I found that processing several files in a row caused MOAGU to create incorrect batch files missing some or all of the needed processing statement. The bug has been reported to Leszek, and I am sure he will fix it if he can reproduce it. However, there is a simple workaround: restart MOAGU before creating the batch file for each piece (the “Create Map Code” button in MOAGU). The steps are as follows:
MOAGU will take several minutes to chop up your _geo.tif file into a number of “tiles”, which are .mp files. It also creates a batch file that will run cgsmapper on each tile to create an IMG file. Process Batch Files with cgpsmapperWhile you can process each individual batch file in MOAGU by clicking on the “Compile Map” button, you have to be around to start each compilation. Since it may take 2-6 hours to process one segment, this is a hassle and requires constant checking to see if a new segment is ready to be processed. Here is the alternative I used successfully and found most efficient:
Result: The batch files will be processed two at a time until they are all finished. Even with my celeron processor, I found that running one batch file at a time only used about 55% of CPU, while running two batch files simultaneously used about 90% of CPU. Net result, the batch files processed faster. For a large project such as the Joshua Tree map, this may take up to a week, depending on number of CPUs in your machine, speed, etc. Load Tiles into Mapset Toolkit and Create Map for Mapsource
Check Map in MapSource for Missing Tiles and Reprocess as NeededMissing tiles are due to either a bug in MOAGU or a problem with cgsmapper (haven't pinned it down yet).
If there are any tiles missing, you can quickly create them as follows:
Now you can take your map and upload it to GPSFileDepot by registering as a member then clicking on Your Account at the top and adding the map so everyone else can use it. |
||||