Note: This page describes the development version of GPSBabel. It may substantially differ from the latest released GPSBabel.

Advanced Usage

Argument are processed in the order they appear on the command line and are translated internally into a pipeline that data flows through when executed. Normally one would:

read from one input
optionally apply filters
write into one output

but GPSBabel is flexible enough to allow more complicated operations such as reading from several files (potentially of different types), applying a filter, reading more data, then writing the merged data to multiple destinations.

The input file type remains unchanged until a new -i argument is seen. Files are read in the order they appear. So you could merge three input files into one output file with:

Example 2.3. Merging multiple files into one

gpsbabel -i geo -f 1.loc -f 2.loc -f 3.loc -o geo -F big.loc


You can merge files of different types:

Example 2.4. Merging multiple files of differing types.

gpsbabel -i geo -f 1.loc -i gpx -f 2.gpx -i pcx 3.pcx -o gpsutil -F big.gps


Example 2.5. Writing the same data in multiple output formats.

You can write the same data in different output formats:

gpsbabel -i geo -f 1.loc -o gpx -F 1.gpx -o pcx -F 1.wpt


If you want to change the character set of input or/and output side you can do this with the option -c <character set>. You can get a complete list of supported character sets with "gpsbabel -l". To change the character set on both sides you should do this:

gpsbabel -i xcsv,style=foo.style -c latin1 -f foo -o xcsv,style=bar.style -c ms-ansi -F bar

Note, that some formats have a fixed character set and ignore this option.