Yet Another GIS Blog
GIS, Geography, Programming, and Neogeography

Garmin Frustrations

Wednesday, 17 June 2009 14:07 by boxshapedwo

First the good news.  I am quite pleased that this blog was referenced by Kelso's Corner, a very enjoyable cartography oriented blog, not once but twice.  Unfortunately, the flow map entry on my blog wasn't particularly interesting.  However, it did get me off my duff and start to look at "porting" the idea to something that works with shapefiles.  I've gotten as far as creating the hierarchical clustering, then I'm a bit lost in how the paths are drawn based on these clusters.  Plus I'm using it as an excuse to study up on c# which has become much easier syntax wise since I've learned a lot about AS3.  I'm no expert in any of the languages by any means.  Also, I might have a little problem in the hierarchical clustering too that arose when I tried it with some more complex data - all 50 US states.  Of course, I've been busy with paid stuff so I can't really focus on this at the moment...now I'll forget where I left off and then have to start over again :).

Now for the real part of this blog.  I don't work with GPS units too often.  Other than downloading data.  Well with the current project I'm working on, I will be doing some ESL GPS training (that's English as a Second Language).  We purchased two Garmin 60CSx units through a US based colleague, and hence have very dodgy Australia data.  So I thought to myself, "No big deal, I'll just use my own data."  Phsssh, adding data to a Garmin GPS is a huge pain in the ass!  Here are the steps I went through to get the data into the Garmin GPS.  I took some of this from site.  To do this required 4 separate pieces of software - Mapsouce (comes with Garmin GPS), Global Mapper (I used version 9, which I have a license for), cGPSMapper (free edition), and finally MapSetToolKit.

Step 1:  Make sure everything is installed on your computer.

Step 2:  Open Global Mapper, load your data.  I used shapefiles, and changed the projection to WGS84.  To change the projection, you use the configuration dialog.  I'm presuming some familiarity with Global Mapper. 

Step 3:  Make sure that each layer has a style/type associated with this.  Go to Tools--> Control Center (alt-c) select a layer, and then click Options.  Choose a type from the Classify Feature As drop down.  This is important, because you will get errors later saying that you have an unknown type = 0, and in the end breaking your installation of MapSource.

Step 3 Alternate:  The alternate method is to click the Edit tool.  Select all the features for one layer (you can use the Control Center to turn them off) and then right-click Edit Selected Features.  In the dialog, under feature attributes, choose New.  In this dialog use MP_TYPE for the attribute name, and then under value you need to enter the HEX code for that type, e.g. 0x01.  You can find different HEX codes in the cGPSmapper manual (C:\Program Files\cGPSmapper\cGPSmapper-UsrMan-v02.4.4.pdf    if installed in default location, page 113, 111).  It's much easier to use the previous other Step 3.

Step 4:  In Global Mapper, File --> Export Vector Data -- Export Polish Map.  Choose a name, and region for export.  Click ok and you will be prompted for a file location.  I've been saving mine under C:\Garmin\prjfolder.

Step 5:  Go to Start --> Run and enter cmd.  This should bring up a DOS prompt navigate to the cGPSmapper install folder.  cd c:\program files\cgpsmapper

Step 6:  Type cgpsmapper.exe c:\Garmin\prjfolder\filename.mp -o c:\garmin\prjfolder\20090618.img

Change the paths to reflect your file system.  The *.img filenmae needs 8 numeric characters.  I find using YEARMMDD format works best.

Press return and wait till it is done processing.  If you see the unknown type error, follow step 3 - 6 till it produces no errors.

Step 7:  Open the MapSetToolKit.exe from whereever you unzipped it.   Click Select IMG and navigate to c:\garmin\prjfolder\ and it should automatically find 20090618.img for you.  Click Add --> and it will add it to the right pane.  Click the elipse ... next to Mapsetdirectory and select c:\garmin\prjfolder\.  Give the mapset a name.  Under family ID enter 3 unique numerical digits.  Under cgpsmapper/cpreview folder, click the elipse ... and navigate to where the cgpsmapper.exe folder is (c:\program files\cgpsmapper\).  Check Install in Mapsource, and Blank Overview Maps.  Click Start.  It should say something like operation termined [sic], and ad to the list of Mapset installed.

Step 8:  Plug in and turn on your GPS unit if you have not done so.  Start Mapsource.

Step 9:  Go to View --> Switch To Product and pick your named mapset.  It should switch to this in the view.  Click the Map Tool button (looks like a polygon) and select the mapset.  Click the Send to Device button and follow the instructions.

Step 10:  Assuming you are in the area, go outside and test it.  If you only see outline boxes but not the map, keep zooming in until you see the presumably more detailed map that you downloaded.

It might in the end be cheaper and easier to just by something that does all this for you, if you don't have a license of Global Mapper.  However, you will get much more use out of Global Mapper as a tool for loading different datasets and reprojecting or converting than you would with something specifically taylored for Garmin GPS mapsets.  That is if you are a GISer or cartographer or use spatial datasets a lot.

 Hope that helps in some way or another.  I partially put that here so that I can remember how I did it :).