A Geocaching HOWTO: Maps

After I finally sprang for a GPS unit I was a little disappointed to fully realize that they wanted me to pay another $200 for the maps. There has to be a better way, I thought…

These notes are for my Garmin GPSmap 60CSx.

Here’s what I’ve done so far:

Get some maps
I found a nice map of all the Washington roads at MapCenter. The binary IMG file is directly Garmin GPS compatible. (There’s two roadmaps for Washington, one from 2005-09-19 and one from 2006-03-04.) Another good Washington source is (oddly enough) the Washington State Office of Financial Management. More map sources are listed below.

Create a Garmin .img map from a .shp shapefile

  • Get a shape file and open it in GPSMapEdit.
  • File -> Save Map As… (Save as type: Polish format (*.mp, *.txt))
  • File -> Export -> Garmin IMG / cgpsmapper.exe (Save as type: Garmin MapSource map (*.img))
  • Enter the path to cGPSmapper.exe
  • Run (this may take awhile.. like 1 hour)
  • On my first try I got “Error E024: Top layer detail level too high to cover entire map – decrease detail level of the less detail layer (use higher Level#).” Let’s try adding another layer..
  • File -> Mp Properties -> Levels -> (highlight Level1) -> Insert Before
    (highlight Level1) -> Change… -> Bits -> 18 -> MapSource zoom range -> 3 (these are complete guesses)
  • That didn’t work.. let’s try bits 20 and range 2… ok!
  • Verified GPSr viewable after manual copy+rename to microSD card.

More info on E024
From the documentation (get it fresh here):

E024 Top layer detail level too high to cover entire map – decrease detail level of the less detail layer (use higher Level#).

This error needs a little more explanation since it is often a source of confusion.

The last layer (the empty one) must always have one ‘tre region’. The maximum size of this region is 65535/2 * resolution (grid). If the map covers a large area, the selected grid may be too low to allow the desired ‘tre region’ to be created.

The maximum size of any object strictly depends on the bit resolution. For resolution 24, the maximum size 1.5 metre * 65535. Similarly, for resolution 23, the maximum size 3 meter * 65535. This means that if the object is too big to fit into the given layer of the map, the bit resolution of this layer needs to be decreased so the layer can accept bigger objects.

Combine multiple .img files into one gmapsupp.img

  • Run sendMap20 (rev 3.5)
  • “Add maps” to get all your .img’s listed
  • Hit “Create GMAPSUPP.IMG”
  • Copy GMAPSUPP.IMG onto your microSD
  • And you get nothing… This isn’t quite working yet…
  • Instead of creating a gmapsupp.img, let’s just hit “Upload maps to GPS”
  • That ends up with nothing as well..

So what I ended up doing was opening each map in GPSMapEdit (using File -> Add…), saving the whole thing as a .mp, and exporting that to a .img using cGPSmapper’s online compiler (when I tried to compile it on my computer I got “Error: Access violation at 0x00417C2C (tried to write to 0x00000000), program terminated.\\”). The finished product is Washington Roads and Waterways 2.

Upload your maps to the GPS unit
I was unable to open my MapCenter IMG with Garmin’s MapSource program. Instead I used sendMap (Version 2.8). Click “Add maps” and then “Upload selected maps to GPS”. Be careful with this, it looks like it could easily delete the existing basemaps.

Or you can copy the map onto your device manually. The GPSr expects to find a file called gmapsupp.img inside a folder called Garmin on the microSD card. Just copying a .img with a different filename onto the MicroSD card won’t work, but if you copy a .img onto the MicroSD card and rename it gmapsupp.img, the GPSr will see it. To access my microSD card directly I hit menu -> menu -> setup -> interface -> USB Mass Storage on the GPSr. Although creating or replacing your gmapsupp.img file should in no way affect your basemaps, remember to take a backup of your old gmapsupp.img files before overwriting.

Even if you want to upload multiple maps, they all need to be bundled into one gmapsupp.img


GPSMapEdit (Windows; shareware)
Allows you to open and overlay multiple maps simultaneously. Supports using cGPSmapper to create Garmin-compatible maps.

When importing each map you need choose the color of the imported features along with which field to use as the name display on the map.

Not seeing what you expected? Try View -> Levels. Each level represents a different set of zoom levels on your GPSr. You have to be careful about the level when combining maps. You don’t want to put too much detail at too high a level, or your map will become too crowded. You might want to add major cities to levels 1 and 2, for example, but smaller cities only to level 0. Once while combining maps I ended up with an extra empty level inserted, which was easily removed. Levels are modified through File -> Map Properties -> Levels.

There doesn’t seem to be a way to really specify the exact destination coordinates of files you add. When combining data from different sources, this can result in your maps not aligning correctly. The only way to change the “Target bounding rectangle” during an import is with the “Datum” dropdown. I have no idea where this list is populated from or what the different values mean (many of which resemble foreign country names?), but they all land your map in about the right location. To get really exact I had to use GPSMapEdit’s Transform feature to adjust the original maps individually before importing. A couple maps I have tried to open had bogus numbers in the “Bounding rectange in source units”; I haven’t found any way to salvage these maps. (Update: I’ve figured some of this out here.)

So far I’ve had success opening MapCenter IMG’s and .shp files. Even though .shp doesn’t show up on GPSMapEdit’s list of “All supported files”, GPSMapEdit has no problem with these. Actually, when working with an existing multi-level map, if you add a single-level .mp, it will only add the single level. If you add a single-level .shp map, it will extrapolate the existing level into the higher level at appropriate levels of detail–very nice! So remember, open you multi-level maps first, and then add your single-level maps.

cGpsMapper (Windows, Linux, on-line; free, shareware, comercial)
Compiles Polish format files into Garmin IMG files. Integrates with GPSMapEdit. After running over an hour compiling a map, I got “Error: Access violation at 0x00417C2C (tried to write to 0x00000000), program terminated.” Fortunately, cGpsMapper also hosts MapCenter, which allows you to upload Polish files and they will compile them for you. MapCenter was able to successfully compile the map that crashed cGpsMapper on my system. Plus, it can save you a couple hours of CPU time. The catch is that then the maps become publicly available, which for me isn’t a bad thing at all.

The instructions are a little vague: to upload you own maps save your .mp as build.mp (lowercase), zip it, create an account, and then just fill out the “Add new map” form. Large maps can take a couple of days to show up, depending on the load. You’ll know your map is ready when a “[build log]” link shows up under your map. If there’s a “[binary IMG – xxk]” link as well, your map compiled successfully. If not, check the log to see what went wrong.

These are the same folks who make sendMap available. Note that http://cgpsmapper.com/ has been updated more recently than http://gps.chrisb.org/en/main.htm.


“ArcExplorer is a lightweight GIS data viewer written in Java that is used to perform basic GIS functions (e.g., view, navigate, and query). It is a downloadable application that operates in a stand-alone environment and does not need to connect to a server. ArcExplorer is heavily used in the education world and runs on both Windows and Apple Macintosh computers.” And Linux! Great viewer, but you can’t save maps as anything other than ArcXML or JPG.

Here’s what I’m still playing with:

The National Map
“The National Map Viewer currently supports download of vector (line-based) features and raster (image-based) data where available…. Datasets will be clipped to the current viewer map extent.” This creates ESRI shapefiles.

GPS TrackMaker
Another map editor. They include basemaps which are at least as good if not better than the included Garmin basemaps. Can convert maps between a few different formats.

Online shape file viewer.

“The MapWindow application is a free, extensible, geographic information system (GIS).”

“Convert GPS or GPX file to ESRI Shape file”.

Washington map sources have moved here.

File format notes have moved here.

A Geocaching HOWTO: Waypoints

Now that I finally have a GPS receiver, I want to get out and use it!

My current workflow for getting caches onto the GPSr is to use GeoToad to search for caches and generate a GPX file, which I send it to the GPSr using GPSBabel or EasyGPS. CMConvert takes the GPX file and creates a PDB file; J-Pilot uploads the PDB onto my Palm, where with CacheMate I have all the descriptions, logs, and other cache goodness at my fingertips.

  • GeoToad: geotoad.rb
  • GPSBabel wrapper: gps_upload.sh filename.gpx
  • CMConvert: cmconvert -d -C -L -O -S -N 15 filename.gpx
  • J-Pilot: jpilot

To enter waypoints manually, I find the Marengo GPS Route Planner helpful. Just copy the generated XML and save it as a .gpx file, and use your favorite transfer utility to get it to your GPSr. Even if I’m not planning on using the waypoints as a route per se, it serve as a convent grouping mechanism.

Software I’ve groked:

(Linux/MacOS/Windows) Runs queries against geocaching.com for caches, with all kinds of filtering options. Output is an XML-style GPX file. A simple query can generate hundreds of caches–give it a few hours to run. Also

(Windows) “EasyGPS is the fast and easy way to transfer waypoints, routes, and tracks between your computer and your Garmin, Magellan, or Lowrance GPS.” Reads in GeoToad GPX files.

(PalmOS) Neatly stores everything about a cache on your Palm. Has the ability to decrypt hints at the touch of a button. I used to think this was good.. but maybe it’s not :). Free trial version holds 10 caches; full version is a reasonable $8. smittyware also makes available a little app called CMConvert to send gpx files to your Palm (./configure; make; sudo make install; man cmconvert). To create Palm-importable pdb files: cmconvert -d -C -L -O -S -N 15 filename.gpx.

(Linux) “J-Pilot is a desktop organizer application for PalmOS devices. It is meant to be an alternative to the Palm Desktop for those who run the most popular Operating Systems in the World, Linux and Unix.” This is for CacheMate, as mentioned above. To get it talking to my old Palm Vx I think all I had to do was fill in the Serial Port under File -> Preferences -> Settings (/dev/ttyS0 in my case) and up the Serial Rate. This was after spending a few hours unsuccessfully trying to sync a Handspring Visor, so I don’t know what collateral damage that caused.

(Linux/MacOS/Windows) “GPS file conversion plus transfer to/from GPS units.”
If the kernel-included garmin_gps driver isn’t working for you, try this. This uploads a .gpx to my GPSr: gpsbabel -s -i gpx -f file.gpx -o garmin -F usb:. Martyn C Davis has released a simple wrapper around GPSBabel for uploading gpx tracks; it is easily extendable. I had to sudo apt-get install libusb-dev before building to get GPSBabel to talk to my USB port.
(BUT: can GPSBabel replace CMConvert by creating something CacheMate can read???)

Software I’m still figuring out:

GSAK (Geocaching Swiss Army Knife)
(Windows) Seems pretty popular. $25 to remove nag screen after 21 day trial. Looks like it does not query for caches; it only loads .gpx/.loc files. Does export to CacheMate (probably through GPSBabel… mag_pdb?).

sudo apt-get install gpsman gpsmanshp libtk-img

sudo apt-get install gpstrans
Doesn’t appear to support USB connection?

Other software:

Appears to be the same thing as GeoToad. The screenshot looks nice, but the latest version (0.9.4) is dated Oct 20, 2003.

Linux Audio

Notes from a local Linux users group meeting a couple months back, with comments from my own experiences.

There are quite a few tools available to the Linux user for working with audio files.

Ripping: grip
sudo apt-get install grip

Edit ID3 tag info: easytag
sudo apt-get install easytag

Make an ISO image: mkisofs -R -J -o <file>.iso ./
jouliet, rockridge – extensions to ISO960 to allow long filenames

Burn: cdrecord

Get internet content (think RealPlayer): trplayer (url)

Wrap and record any stream: vsound -n -t
sudo apt-get install vsound

Convert au -> mp3: lame

Find Streams: streamtuner
sudo apt-get install streamtuner
“streamtuner is a stream directory browser.”1 streamtuner lets you browse SHOUTcast, Live365, and other streaming music services. It even provides the same clean interface to your local music collection. I always had trouble connecting some streams through their respective web interfaces, and even Winamp plugins, but no trouble whatsoever with streamtuner.

Setup is easy; under Edit -> Preferences add the path to your local music collection under General, and check the defaults under Applications. I changed my “Record a stream” command to x-terminal-emulator -e streamripper %q -d /tmp/foo -r.

Record Streaming MP3s: streamripper
sudo apt-get install streamripper
Interfaces very nicely with streamtuner. Unlike vlc (or at least my limited knowledge of it), streamripper will automagically break the stream into appropriately ID3-tagged tracks.

Manage (and host) music: slimserver

Edit MP3s: xmpgedit

sudo apt-get install audacity works great and is easy to use.
It wanted libmp3lame.so to do the actual mp3 encoding; /usr/lib/libmp3lame.so.0 worked just great.

I also tried ecawave, but that wasn’t as easy to use.

Using acodec=mp3 doesn’t work for me, but mpga works fine. Now, how to add ID3 tag info and set the duration I want it to record for?

vlc –http-caching 5000 mms://stream.name –sout=”#transcode{acodec=mpga,ab=128,channels=2}


And a much more complete list:

powered by WordPress     themed by Mukkamu     presented by ideaharbor.org     everything else by steve hulet