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

Style file overview

The first and foremost important step is understanding how the style file is laid out itself. The format is:

DIRECTIVE<whitespace>VALUE

Where <whitespace> is one or more spaces or tabs. There should be no spaces or tabs at the beginning of the line; all directives start at the left edge in column zero.

An example style format is shown here:

# Format: MS S&T 2002/2003
# Author: Alex Mottram
#   Date: 12/09/2002
#

DESCRIPTION       Microsoft Streets and Trips 2002-2006
EXTENSION               txt

#
# FILE LAYOUT DEFINITIIONS:
#
FIELD_DELIMITER      TAB
RECORD_DELIMITER  NEWLINE
BADCHARS    ,"

PROLOGUE Name  Latitude Longitude   Description URL   Type  Container   Diff  Terr

#
# INDIVIDUAL DATA FIELDS, IN ORDER OF APPEARANCE:
# NOTE: MS S&T ONLY IMPORTS DATA, IT DOESN'T
#       EXPORT THIS ANYWHERE SO WE CAN HAVE OUR
#       WAY WITH THE FORMATTING.
#
IFIELD   SHORTNAME, "", "%s"      # Name
IFIELD   LAT_DECIMAL, "", "%f"    # Latitude
IFIELD   LON_DECIMAL, "", "%f"    # Longitude
IFIELD   DESCRIPTION, "", "%s"    # Name 2 (Big Description)
IFIELD   URL, "", "%s"         # URL
IFIELD   GEOCACHE_TYPE, "", "%s"     # Geocache Type
IFIELD   GEOCACHE_CONTAINER, "", "%s"   # Geocache Type
IFIELD   GEOCACHE_DIFF, "", "%3.1f"  # Geocache Type
IFIELD   GEOCACHE_TERR, "", "%3.1f"  # Geocache Type

Each of these lines will be explained in the following sections.