Geotagging Photos with Lightroom and Trails

At the moment I'm using three tools to geotag my photos: Lightroom, Trails GPS tracker for iPhone and Jeffrey Friedl's "GPS-Support" Geoencoding Plugin for Lightroom. In the past I used Geotagger in conjunction with Google Earth, but that method writes the GPS data to JPG files. I wanted a way to geoencode the original RAW files in Lightroom. Jeffrey Friedl's plugin makes this possible, since it can take GPS coordinates from a tracklog and store them in a Lightroom catalog.

Step 1: Record a Tracklog

The first step is to record a tracklog while you're out shooting. If you don't already have it, install Trails from the App Store. Make sure your camera's clock is set to the same time as your phone, then start a new track. Lock your phone and put it in your pocket. As you move around, Trails will track your movement. If you have an iPhone 3Gs or iPhone 4 make sure you have the latest version of iOS. The multitasking allows Trails to run in the background and continually record your position. On iPhones without multitasking, Trails will do its best to make a good tracklog by connecting good data points with a straight line. The following screenshots illustrate the difference between Trails tracklogs produced with and without multitasking. GPS Tracklog Comparison The map on the left shows a trail recorded on an iPhone 3G without multitasking. The app was able to plot about a dozen data points and connected them with straight lines. The map on the right shows a tracklog recorded on an iPhone 4 with multitasking. Trails was able to frequently get new GPS data points, and the resulting tracklog is pretty accurate. Trails causes your battery to run down faster than usual. Make sure you remember to turn it off when you're done shooting, and periodically check that you have enough battery life to make it to the next charging opportunity in case you need to make an emergency call.

Step 2: Download the Tracklog

Trails Export Button One of the easiest ways to get a Tracklog out of trails is emailing it to yourself. Open the tracklog from the "My Tracks" area and touch the "Export" button in the bottom left corner of the screen. One of the export options will be "Email" -- enter your address and you'll get the tracklog as both GPX and KML files. The KML file can be opened in Google Earth. The GPX file is what you'll need for geotagging in Lightroom.

Step 3: Sync Photos to the Tracklog

If you don't already have it, download and install Jeffrey Friedl’s “GPS-Support” Geoencoding Plugin for Lightroom. Jeffrey makes great Lightroom plugins so be sure to leave a donation. In Lightroom, select all the photos you wish to geoencode and click File → Plugin Extras → Geoencode… Go to the Tracklog tab and find the first field labeled Sync to tracklog(s). Click the "Browse…" button to open the GPX file you got from Trails. Choose your timezone from the next drop down menu, then optionally adjust the "fuzziness" and time compensation fields. Click the Geoencode Images button and Jeffrey's plugin will record the map data for each photo in your Lightroom Catalog's database. This process works by checking the timestamp on each photo and looking for the closest GPS data point in the tracklog. Now when you export JPGs and upload to publishing services from Lightroom, you can include this "GPS Shadow Data" (you'll see new options in the Export settings window). Programs and services such as iPhoto, Picasa, Flickr and SmugMug can read this data and plot your photos on a map. Remember: this means anyone can see where you were when you took a photo. It might not be a good idea to do this with photos taken at home or work.