I have a large number of photos I would like to tag using data recorded with my GPS tracker. Ideally I would like to correlate the time-stamps of my photos with the positions reported by my tracker at those specific times.
What's the fastest and easiest way to achieve this?
Note: The pictures are standard jpeg files, the GPS data is formatted as a KML file.
Best Answer
CLI solution
Overview
When dealing with metadata of any sort exiftool should always be the utility of choice. It comes with a plethora of different options and commands that allow you to tag images at your will.
For instance, if you want to tag all images in a specific folder with the geodata provided by a
KML
file you can use the following commands:Of course there are far more options and settings available. For all the intricate details surrounding GPS-tagging with exiftool I'd advise you to consult this section of the exiftool documentation.
Installation
exiftool is part of the official Ubuntu repositories and can be installed with the following command:
GUI solution
Overview
There are multiple front-ends to exiftool available. GPicSync is one that specializes in Geotagging images. The interface is simple and easy to use:
Having specified the image folder and the GPS file you want to use, you simply click on Synchronize to update the image metadata with GPS tags.
Additional options allow you to set a time offset and to even view your images in Google Earth.
Installation
Installing GPicSync requires manually setting up its dependecies and downloading the python source code. There have been calls to package GPicSync in Ubuntu/Debian, but all available packages are outdated.
Here are the steps you will have to follow to install and set up GPicSync:
Install all dependencies
Check out the latest python source
Navigate to the cloned folder, make GPicSync executable, and run it:
That's it. GPicSync should be up and running. To better integrate the app into your system you could look into creating a launcher for it.
I have tested these installation instructions on Ubuntu 12.04. Package names and dependencies might differ on newer releases.
Converting between different GPS data formats
Overview
One downside to GPicSync is that it only supports two input formats, GPX and NMEA. Compared to exiftool that's very little. However, if need-be you can always convert between different GPS data formats by using GPSBabel. E.g., to convert from KML to GPX you could use the following command:
Another option would be to use one of the many online converters such as this one.
Installation
gpsbabel is part of the official Ubuntu repositories and can be installed with:
Further reading on gpsbabel usage.