Living with a Garmin:

Struggling with GPX

GPX is the universal interchange format for map programs and GPS devices ... well maybe -

If you try to push the boundaries of your GPS usage, you soon come across the GPX file format.

Most map and GPS-related programs have an option to output, export or Save As GPX, and most likewise have an option to import or Open GPX files.
In particular, most options for downloading route information from online mapping services such as Google Maps, give you a GPX file, or sometimes just a wodge of text that can be saved in a text editor with the .gpx extension.

As a sidenote - from the above you can see that any GPX file can in fact be opened and inspected (or even edited) using a Text Editor such as Notepad - or even, with care, in MS Word!
However you should avoid editing a GPX in this way if at all possible - look, but don't touch would be a good motto here - and if you do alter it, use a Save As to preserve the original, just in case.

In practice, it is quite common for a program to be unable to open a GPX from another source, or, it opens but appears to be altered in some way, or appears as a Route when you were hoping for a Track, etc.
Mapsource seems to be especially intolerant of GPX files from other sources.

Several free or inexpensive utilities can be found on the web to help with these difficulties - however I must say straight away that they all tend to geekiness compared even with standard desktop mapping software (and that can be bad enough!).

For example, a GPX file downloaded from Bikely will not open in Mapsource or you don't even have Mapsource.
The simplest solution is to download and install EasyGPS.
Open the GPX file, and Save. Now it will open in Mapsource. Or, just open the file and transfer it to your GPS direct from EasyGPS.

Note: a fairly recent revision to Bikely means that downloads will now open in Mapsource, directly.
This means these axamples are now out of date, but I've left them as a general modus operandi for similar problems.

Example: a Route built in Bikely using 'follow roads' is downloaded as a GPX, but has too many Waypoints. Most Garmins will only allow a max of 250 points in a Route, or 500 in a Track. It needs to be converted from Route to Track, and maybe it needs to be downsampled.
GPSBabel is a one-stop shop for all this, and will also do the other job, above. But it is much geekier.
Fortunately for Windows users, the zip download includes GPSBabelGUI.exe and this is a clunky but usable graphical interface to what is basically a command-driven program. Just unzip everything and then run GPSBabelGUI.

Now you can select an Input format of GPX XML and an Output format of - well, Garmin Mapsource gdb.
(Or, again, you can output direct to your GPS.)
Browse to your input file, and browse to the same file again on the output side but change its name to do a Save As.
Now look at some Options. On the output side, select the tickbox for version and set it to v2.
Next to What? tick Routes (Bikely GPX is formatted as a Route). Note: now revised, Bikely now formats as a Track
Now open the Filter. Select Transform and Routes -> Tracks, select Simplify and Limit to 500 Points.
You can name the Track as well if you want, at this point. Then it's OK and Lets Go

That was pretty complicated by Windows standards but it got a lot done, and this program can solve a lot of otherwise knotty problems. It can even convert Autoroute files, and some other problematic formats like Tracklogs and Fugawi.
GPSBabel is highly recommended, for anyone wanting to get in deep with their GPS.

Francis Cooke


Further Reading ... (the following is the 1st couple of paragraphs of the linked article
More GPX - please follow the link for a fuller exploration.

The GPX format is a subset of XML. XML is a markup language and therefore simple in concept. 30 years ago, we were comfortable with word-processors where you typed [bold]bold[/bold] like this and [italic]italic[/italic] like this.
However somewhere along the way, the wrong people got involved and XML became very tricky to actually do right. A shame because it infiltrates much of modern computing, far and away from the narrow interest of GPS stuff. It is also a data-centric language and highly organised. So this would be good XML (in the right context):

ie - Titles and Authors only exist in Books, and Books only exist in Bookshops.
This data-centric organisation is very apparent in GPX files.
Here's the meat of a very simple GPX file - NB I leave some headers and footers out for now -
(this was generated by Google Maps and GmapToGPX which is another very useful free tool):

It doesn't get much simpler than this. (It's just a fragment of course - the full file goes on for pages.)
Compared with the example above - Comments occur within Trackpoints, Trackpoints within Track Segments, Track Segments within Tracks.
You can see (even without looking at the Name) that it's a Track by observing that everything is wrapped in [trk] [/trk] tags.
You can see that each Trackpoint - apart from the first 2 - consists of a simple pair of co-ordinates, no more, no less.
The first two have (optional) Comment fields that can be displayed (optionally) in the GPS where and when appropriate.
The [trkseg] tags indicate that the enclosed [trkpt]s are to be treated consecutively, to form a continuous Track.
(Two or more [trkseg]s would indicate a broken track, due maybe to tree cover - but in fact at least 1 [trkseg] is always required, as a wrapper for the [trkpt]s.)
The whole is enclosed, with some header lines that I haven't shown here, in a pair of [gpx] tags and an [?xml] header, and the result is a file that Mapsource is completely happy with.

For more, please follow this More GPX link.

Google Maps
Bikely
GmapToGPX
EasyGPS
GPSBabel

Some basic stuff:
Living with a Garmin: Etrex Basic Setup
Definition of Terms eg Route, Track etc
Living with a Garmin: Battery Runtime and Etrex Jitter
Living with a Garmin: The Waypoints Limitation
Living with a Garmin: The Follow Road Trap
Living with a Garmin: The Circular Routes Problem
Living with a Garmin: Declutter the Page Sequence
Living with a Garmin: Living with Mapsource Maps
Living with a Garmin: Waypoint Naming (for direct-style routes)
Living with a Garmin: Colour your Tracks and Routes
Living with a Garmin: Create a Route on the GPS
Top 5 GPS Tips (pdf) reprint of Arrivee article published Feb 2007
Some GPS FAQs web version of Arrivee article published Nov 2008
 
NEW - Garmin Etrex 20/30 essays:
Etrex 30 review reprint of Arrivee article published Jan 2012
Etrex 20 & 30, Basic Setup
Taming the Etrex 20/30: Restore the 'Page' key.
Dakota 20 review reprint of Arrivee article published Feb 2010
Living with a Garmin: Waypoint Naming and the Dakota 20 / Etrex 30
 
More Garmin essays - not-so-basic:
Garmin Etrex C Menu Map (pdf, July 2008)
Living with a Garmin: Full Reset
Living with a Garmin: Track, Route or Autoroute
Living with a Garmin: Three Ways to Beat the Waypoint Limit
Living with a Garmin: Three Ways to Beat the Trackpoint Limit
Living with a Garmin: Less is More
Living with a Garmin: Add Contours to your GPS Maps
Living with a Garmin: Struggling with GPX  &...  More GPX
Living with a Garmin: Screens you don't see every day
Living with a Garmin: Downgrade your Mapsource
Living with a Garmin: Put an OSM Map on your Garmin
Living with a Garmin: GPS Soak Test files to test your GPS waypoint capacity
OpenStreetMap and Mapsource Add OSM to your Mapsource collection
A Google Maps Workflow Create, Edit, Save, Share and Export a route