Wednesday, April 22, 2009

Creating a GPX Trip File

Here is a nice procedure I have developed for concatenating several days worth of GPS waypoints and tracks into a single GPX file. The end result is a compact, neat file that hierarchically contains each day's track and waypoints with appropriate descriptions. This file can be easily shared and viewed intuitively in most mapping programs, including Google Earth.
This procedure is written based on the procedure I used to record data to my Garmin eTrex Vista Cx as described in this previous post.
  1. Extract waypoints from the GPS using Garmin Mapsource. Delete all non-relevant waypoints from list view and save remaining waypoints to ProjectWaypoints.gpx.

  2. Copy all GPX track files from GPS expansion memory card to PC. (One for each day of the trip.)

  3. Open up ProjectWaypoints.gpx in firstobject XML editor and save as Project.gpx.

  4. Open up the first day's GPX track file in another instance of firstobject XML editor.

  5. Merge or delete separate tracks from the first day to create a single track for the day. Mapsource is useful for identifying and deleting extraneous points. firstobject XML editor or Notepad can be used to manually merge two track segments (XML tag = ).

  6. Copy the track from the first day and paste into Project.gpx at the same level as the waypoints. In order for the Copy/Cut/Paste functions to be available, you will need to double-click the item you are copying or where you are pasting. This will highlight a chunk of the GPX file, and you will then know that you have copied or can paste.

  7. Repeat the process for each day of tracks.

  8. Edit the name for each waypoint and track in Project.gpx. (The tree view can show the name of each waypoint in firstobject XML editor if the following lines are added to the Tree Customization box under Tools->Preferences: trk name and wpt name.)

  9. The GPX file can now be opened in other applications (Google Earth, Mapsource, etc) and will show all the relevant geographical data for the trip while allowing individual tracks for waypoints to be toggled ON or OFF. If viewing in Google Earth, be sure that View->Show Time is set to Never, or G.E. will only show the track for the currently selected time frame.

No comments: