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

Universal csv with field structure in first line (unicsv)

This format can...

  • read and write waypoints

  • read and write tracks

  • read and write routes

This format has the following options: datum, grid, utc, format, filename, fields .

Unicsv examines the first line of a file to determine the field order and field separator in that file. On write, it tries to figure out what data it has and writes headers and all the data it can.

If the first line contains any tabs, the data lines are assumed to be tab separated. Otherwise the fields are assumed to be separated by commas.

The list of keywords include:

      alt =      Elevation (in meters) of the point. Add "ft" or "feet" for feet.
      arch =     Geocache archived flag
      avail =    Geocache available flag
      bng_e =    British National Grid's easting
      bng =      full coordinate in BNG format (zone easting northing)
      bng_pos =  full coordinate in BNG format (zone easting northing)
      bng_n =    British National Grid's northing
      bng_z =    British National Grid's zone
      caden =    Cadence
      comment =  Notes
      cont =     Geocache container
      cour =     Heading / Course true
      date =     Date (yyyy/mm/dd)
      depth =    Depth (in meters).  Add "ft" or "feet" for feet.
      desc =     Description
      diff =     Geocache difficulty
      ele =      Elevation (in meters) of the point. Add "ft" or "feet" for feet.
      e/w =      'e' for eastern hemisphere, 'w' for western
      exported = Geocache export date 
      found =    Geocache last found date
      fix =      3d, 2d, etc.
      gcid =     Geocache cache id
      geschw =   Geschwindigkeit (speed)
      hdop =     Horizontal dilution of precision
      head =     Heading / Course true
      heart =    Heartrate
      height =   Elevation (in meters) of the point
      hint =     Geocache cache hint
      icon =     Symbol (icon) name
      lat =      Latitude
      lon =      Longitude
      name =     Waypoint name ("Shortname")
      n/s =      'n' for northern hemisphere, 's' for southern
      notes =    Notes
      pdop =     Position dilution of precision
      placer =   Geocache placer
      placer_id =Geocache placer id
      power =    Cycling power (in Watts)
      prox =     Proximity (in meters).  Add "ft" or "feet" for feet.
      sat =      Number of sats used for fix
      speed =    Speed, in meters per second. (See below)
      symb =     Symbol (icon) name
      tempf =    Temperature (degrees Fahrenheit)
      temp =     Temperature (degrees Celsius)
      terr =     Geocache terrain
      time =     Time (hh:mm:ss[.msec])
      type =     Geocache cache type
      url =      URL
      utc_d =    UTC date
      utc_t =    UTC time
      utm_c =    UTM zone character
      utm_e =    UTM easting
      utm =      full coordinate in UTM format (zone zone-ch easting northing)
      utm_pos =  full coordinate in UTM format (zone zone-ch easting northing)
      utm_n =    UTM northing
      utm_z =    UTM zone
      vdop =     Vertical dilution of precision
      x =        Longitude
      x_pos =    Longitude
      y =        Latitude
      y_pos =    Latitude
      z =        Altitude (elevation).  See "elevation".

We support some enhanced Garmin attributes. They are also available in gpx, gdb, garmin_gpi and partly garmin_txt. These entities are currently not visible in MapSource™ (6.12.4), but are NOT dropped when working with GDB (version 3) or GPX files.

Please note, that these do NOT provide a geocoding service; don't expect to "convert" a street address to a latitude and longitude.

      addr =     Street address
      city =     City
      country =  Country
      faci =     Facility (not available in GPX)
      phone =    Phone number
      post =     Postal code
      state =    State

Fuller spellings (i.e. "longitude") may be used. You can also use keywords with a whitespace instead of an underscore.

A typical file may be:

     Name, Latitude, Longitude, Description 
     GCEBB,35.972033,-87.134700,Mountain Bike Heaven by susy1313
     GC1A37,36.090683,-86.679550,The Troll by a182pilot & Family

On the output side unicsv writes fixed number of columns (waypoint index, latitude and longitude) followed by a variable column list depending on internal data.

With at least ONE valid timestamp in data a unicsv output may look like that:

     1,"GCEBB",35.972033,-87.134700,"Mountain Bike Heaven by susy1313",2003/06/29,09:00:00
     2,"GC1A37",36.090683,-86.679550,"The Troll by a182pilot & Family",,

For speed, a units specifier can be added to override the default. Here are some values, but check parse_speed() in for the authoritative list.

  • m/s, mps: meters per second

  • km/h, kmh: kilometers per hour

  • kt, knots: knots

  • mph, mi/h, mih: miles per hour

datum option

GPS datum (def. WGS 84).

This option specifies the datum to be used on output. Valid values for this option are listed in Appendix A, Supported Datums.

grid option

Write position using this grid..

This value specifies the grid to be used on write. It is similar to the grid option of garmin_txt (see Table 3.1, “Grid values for garmin_txt”). The only difference is that unicsv does not write a degree sign (°) into the output file.

Without this option unicsv writes the coordinates as simple numbers like in the samples above.

utc option

Write timestamps with offset x to UTC time.

This option specifies the local time zone to use when writing times. It is specified as an offset from Universal Coordinated Time (UTC) in hours. Valid values are from -23 to +23.

format option

Write name(s) of format(s) from input session(s).

When this option is enabled, we generate an additional 'Format' column. The values of this column are filled with names of previous input formats.

Example 3.39. Example for unicsv format option to write names of input formats.

The next example ... gpsbabel -i gpx -f file1.gpx -i gdb -f file2.gdb -o unicsv,format=y -F result.txt ... could produce following output:


filename option

Write filename(s) from input session(s).

When this option is enabled, we write an additional column called 'Filename'. The values of this column are filled with filenames of previous input formats.

This can be very helpful for locating specific waypoints (i.e. using the position filter) in more than one file.

Example 3.40. Example for unicsv filename option to write filenames of input formats.

The next example ... gpsbabel -i gpx -f file1.gpx -i gdb -f file2.gdb -o unicsv,filename=1 -F result.txt ... could produce following output:


fields option

Name and order of input fields, separated by '+'.

This option lets you specify the field names of your input file from the command line instead of relying on the first line of your input file describing the file. Field names are separated by a '+' character. The list of field names is exactly that allowed in the first line of a unicsv file without this option.

Example 3.41. Example for unicsv fields option to describe input file.

For example ... gpsbabel -i unicsv,fields=lat+lon+description -f file.csv -o gpx -F file.gpx declares that file.csv has three fields, latitude, longitude, and description, in that order.