icon GPSdings exifloc

exifloc uses tracks from a gpx 1.1 file to determine the geolocation of digital camera pictures. The tracks of the gpx file are used to establish where you (and the gps receiver and the camera) have been at a given time. Then, the time each photograph was taken is read from the jpeg file header and if it falls into a timespan covered by the gpx tracks the corresponding geolocation is associated with the picture. It is highly recommended that you provide exifloc with the offset between the camera time(zone) and UTC using one of the -u, -c and -C options described below. A convenient method is to take a picture of your gps receiver displaying the (UTC) time while you're on the track and use -c or -C. If you specify none of these options gpsdings will try to retrieve the correct local time zone from geonames, and if that fails use your computer timezone. The UTC offset for this time zone is then calculated for the time the first of your pictures was taken. exifloc writes the offset thus calculated to stderr. You can refine this "raw" offset by comparing actual to expected results.
There are several options for output. See the description of --javascript, --kml, --text, and --xml below. Moreover, gps information can be written to the file headers of the jpegs as Exif or XMP. For Exif, you can choose between a fast integrated exif library with the -E option (this library will however discard all vendor-specific Exif information = maker notes) and one of the free, non-Java programs exiv2 or exiftool with the -e option. Exiftool is slow but best in terms of maker note support, exiv2 is faster but does not support maker notes from all camera models (though it will usually not spoil them). Instead of the exiv2 executable you can also use the libexiv2 library via JNI.
When a jpeg already has sufficient geoinformation in its header you can tell exifloc to use it with the --read-gps-tag option. In this case you can omit the --gpx option.
exifloc can only process tracks with date-time information. Older Garmin hand-held receivers store this information in the Active Log but discard it when you save a track.
USAGE: gpsdings exifloc -g <gpxfile> [other options] [<jpeg>...]
 -g,--gpx <gpxfile>                Read gps tracks from this gpx file.
 -r,--read-gps-tag                 Use XMP or Exif GPS information. In this case
                                   the -u, -c and -C options have no effect.
 -x,--xmp                          Read XMP not Exif. This affects both how
                                   GPS tags and creation times are read.
 -u,--utc-offset <secs>            Adjust the times read from the jpeg headers
                                   by subtracting this number of seconds.
                                   Depending on whether you read Exif (does not
                                   store timezone) or XMP (stores timezone)
                                   you might have to use different values.
 -c,--calibrate <dateTimeList>     Adjust the times read from the exif data of
                                   the jpegs. The argument is a quoted
                                   whitespace-separated list of pairs of dates
                                   'cameraDateTime[1] utcDateTime[1] ...
                                   cameraDateTime[N] utcDateTime[N]' formatted
                                   according to the pattern specified with the
                                   -d option.
                                   The first date cameraDateTime[j] in each pair
                                   is the date of the digital camera, the
                                   second utcDateTime[j] is the corresponding
                                   GPS UTC date. If n = 1 then camera times
                                   are converted to UTC times by adding
                                   utcDateTime[1] - cameraDateTime[1].
                                   If n > 1 then the times between the earliest
                                   and the latest calibration dates will be
                                   calculated by interpolation (linear for n=2,
                                   spline for n > 2) and times outside the range
                                   of interpolation are calculated by adding the
                                   offset of the closest calibration point.
 -C,--Calibrate <jpegDateTimeList> Adjust the times read from the exif data of
                                   the jpegs. The argument is a quoted
                                   whitespace-separated list of pairs of jpeg
                                   files and dates 'jpeg[1] utcTime[1] ...
                                   jpeg[N] utcTime[N]'. This option works like
                                   the --calibrate option, except that the
                                   camera times are read from the jpeg file
                                   headers. Filenames with blanks must be
 -d,--date-format                  Parse dates passed to the -c and -C options
                                   with this java.text.SimpleDateFormat pattern.
                                   The default is yyyy-MM-dd'T'HH:mm:ss, a date
                                   formatted according to this pattern looks
                                   like 2006-01-30T23:55:57
 -t,--text <file>                  Write plain text to this file. Use - for
                                   stdout (this is the default output).
 -G,--GPX <file>                   Write GPX to this file. A new GPX file with
                                   a waypoint for each successfully processed
                                   image is created. Use - for stdout.
 -k,--kml <file>                   Write Google Earth KML to this file. A new
                                   KML file with a Placemark for each
                                   successfully processed image is created. Use
                                   - for stdout. The Placemark description will
                                   contain an absolute path reference to the
                                   corresponding jpeg file. You can alter this
                                   to an online URL using simple
 -z,--kmz <file>                   Create a Google Earth KMZ file with
                                   embedded photographs. To get a usable
                                   result with a moderate total file size
                                   you should shrink the photographs to
                                   a reasonable size (eg. < 200 px in each
                                   dimension). If you specify --image-size
                                   exifloc will do this for you.
 -j,--javascript <file>            Write Google Maps API javascript to this
                                   file. Use - for stdout.
 -i,--image-size <width> <height>  Give exifloc a hint as to the
                                   desired image size. In --javascript,
                                   --kmz and --copy-to modes images
                                   will be scaled down proportionally to have at
                                   most these dimensions.
 -y,--copy-to <dir>                Copy jpegs to directory dir and work on these
                                   copies. This option is mandatory when you
                                   alter the images with one of the
                                   --image-size, --stamp or --track options.
                                   It is recommended with --exif, --Exif and
 -s, --stamp <pat> <pos> <alpha>   Overlay jpegs with rich text optionally
                                   including coordinates and/or time. pat is a
                                   pattern describing the text to be
                                   generated. pos is the position where the text
                                   should be placed: one of N, NW, NE, S, SW,
                                   SE. alpha is the text opacity between 0.0
                                   (= transparent) and 1.0 (=opaque).
 -T, --Track <pos> <size> <background> <track> <marker>
                                   Overlay jpegs with a view of the GPS track
                                   with a marker at the location where the
                                   photograph was taken. pos is the position
                                   as in the -s option; size is the greater
                                   dimension of the track view divided by the
                                   lesser dimension of the image; background,
                                   track and marker are the colors for the
                                   respective objects. A color can be expressed
                                   as the name of one of the java.awt.Color
                                   Color constants (e. g. red) or a numeric
                                   sRGB color specification consisting of the #
                                   character followed by 6 or 8 hexadecimal
                                   digits. The digits are interpreted as
                                   [AA]RRGGBB where AA is the alpha value
 -X,--XMP                          Write GPS information to XMP tags (should be
                                   considered experimental, be sure to make
 -E,--Exif                         Write GPS information to the exif tags.
                                   Currently, this will overwrite existing GPS
                                   information in the jpegs without warning, and
                                   all vendor-specific EXIF MAKER NOTES WILL BE
 -e,--exif [<exec>]                Write GPS information to the exif tags of the
                                   jpeg files with a non-Java writer. exec is
                                   interpreted as the path to the gpsdingsjni
                                   library if it contains "gpsdingsjni", or
                                   the system command that invokes exiftool
                                   if it contains "exiftool" or exiv2
                                   otherwise. If exec is not specified gpsdings
                                   will look for the gpsdingsjni library on the
                                   java library path and in its own directory.
 -h,--help                         Print this help and exit
 -l,--license                      Display the licenses for this program and
                                   for included libraries.
 -q,--quiet                        Suppress status and error information.
GPX 1.1 can be created from a lot of other geo-coordinate formats with GPSBabel. Use the option "gpxver=1.1" in GPSBabelGUI or "-o gpx,gpxver=1.1" for command line gpsbabel. No datum conversion is performed, therefore all files should be in WGS84.
This program is licensed to you under the GNU General Public License version 3.