Note: This page describes an obsolete version of GPSBabel that may substantially differ from the current or development version.

Transform waypoints into a route, tracks into routes, ... (transform)

This filter can be used to convert GPS data between different data types.

Some GPS data formats support only some subset of waypoints, tracks, and routes. The transform filter allows you to convert between these types. For example, it can be used to convert a pile of waypoints (such as those from a CSV file) into a track or vice versa.

The following example show you how to create a route from a waypoint table.

gpsbabel -i csv -f waypts.txt -x transform,rte=wpt -o gpx -F route.gpx

Only the first letter of option value decides which transformation will be done. Depending on the used option it can be only 'W' for waypoints, 'R' for routes or 'T' for tracks.

wpt option

Transform track(s) or route(s) into waypoint(s) [R/T].

This option selects the destination type of this filter to be waypoints. Choose this when you want to convert tracks or routes into waypoints.

Example 4.20. Converting a track to a sequence of waypoints

Say you you have a KML file that contains a track but you want to convert it to a CSV file that can contain only waypoints, perhaps to import into a spreadsheet. Use the following command:

gpsbabel -i kml -f blah.kml -x transform,wpt=trk -o csv -F blah.txt


rte option

Transform waypoint(s) or track(s) into route(s) [W/T].

This option selects the destination type of this filter to be routes. Choose this when you want to convert tracks into waypoints routes. A single route will be created in the sequence they appear in the input.

Example 4.21. Converting a pile of waypoints to a GPX route

Say you you have a data file that came from CSV file that you want to convert to a GPX route that can be loaded into Mapsource. Use the following command:

gpsbabel -i csv -f blah.txt -x transform,rte=wpt -o gdb -F blah.gdb


trk option

Transform waypoint(s) or route(s) into tracks(s) [W/R].

This option selects the destination type of this filter to be tracks. Choose this when you want to create tracks from a list of waypoints or routes. A single track will be created in the sequence they appear in the input.

Example 4.22. Converting a pile of waypoints to a GPX track

Say you you have a data file that came from CSV file that you want to convert to a GPX track that can be loaded into Mapsource. Use the following command:

gpsbabel -i csv -f blah.txt -x transform,trk=wpt -o gdb -F blah.gdb


del option

Delete source data after transformation.

This option, when used in connction with the wpt, rte, or trk options, tells GPSBabel to delete the source data after conversion. This is most useful if you are trying to avoid duplicated data in the output.

Example 4.23. Convert a GPX track to GPX waypoints, tossing the original track

gpsbabel -i gpx -f blah.gpx -x transform,wpt=trk,del -o gpx -F converted.gpx