Geotagging your photos

Another post for the photographers amongst you who are curious about my processes. This time it’s about how I use GPS data to geo-tag my photos with exact GPS coordinates.

Choosing my first book
20° 36’41” N, 102° 1’58” E
EOS 40D, 50mm/1.8 (A2_003826)
By attaching location information to your photos, you add lots of flexibility in how you can use the photos. Not only do software such as Adobe Lightroom, Apple’s Preview, iPhoto, etc have functions to show you a map of the photo’s location, but you can also do things like search for images within a specified radius of a given point. When exploring Google Earth you’ve probably noticed the little clickable icons that show you pictures of the location. With Google Earth and KML files you can even put together a log of a trip for yourself complete with a trail on the map and clickable photos at each location.
All of this starts with geotagging the photos.
Incidentally, there are at least two locations in every photo: the photographer’s and the subject’s. While work is being done on ways to store multiple locations in image metadata, today we can just store one and usually just embed the photographer’s location.

Attaching a GPS to your camera
Some cameras allow you to connect a GPS to them (usually mounted on the hot-shoe and connected via a short cable) and record the location information directly into the photo as it’s taken. Nikon sell the tiny GP-1 GPS for this, and models from other manufacturers are also available. A few compact cameras have internal GPS units (even the iPhone 3G can geotag its photos). While this can be convenient, in real-world use it can have some issues:
  • If you’re using more than one camera you’ll need more than one GPS. If you’re thinking that using more than one camera sounds extravagant, maybe it’s just because you’re still using your first camera. Once you have more than one (even a shiny new model and an older model) you may find that it’s very useful to be able to work with two bodies. For example in Africa and in Antarctica when I’ve been working from vehicles, having a wide-angle lens mounted on one body and a telephoto on another has been amazingly useful. But only having some of my photos geotagged would be annoying.
  • When you turn a GPS on it will take a while to lock onto enough satellites to get a position fix. If it has had a fix recently this can be very quick, but depending on the local geography, current satellite orbits, as well as the sensitivity of the GPS the process can take minutes.
    If you turn your camera on to take some photos immediately, if the GPS has been off you’re likely to end up with no GPS data on your photos.
Another option is to carry a GPS unit with you that’s continually on, recording logs of where you’ve been. The GPS gets accurate time from the satellites, and each position in the log has a timestamp. As long as you set the right time in your camera before you started shooting, software on your computer later can work out from the log where you were when the photo was taken. This is the function provided by geotagging software.
My GPS

image courtesy of Garmin

A wide variety of GPS units are on the market and are suitable for this application. Some simply log data, some are fully-fledged navigation devices.
I have been recording GPS logs of my travels since the early 2000s. My first unit was a Garmin GPS II, which only had enough memory to record about 2 hours of highway travel. Later I used a Garmin eTrex Legend which had better sensitivity and enough memory to cope with a day’s work. Today I use a Garmin eTrex Legend HCx which I am very happy with.
It’s small enough to slip into a pocket, and the sensitivity is impressive: inside a car or under a freeway it usually has no problem getting a lock (although dense structures and wet foliage do cause some issues). I have clip-on mounts for it in my car and on my bicycle, and when walking I have it in a top pocket (or sometimes the top compartment in a camera bag). A pair of AA batteries lasts all day long (finding it ran out half-way through an outing would be … disappointing). It has a microSD card inside which I’ve loaded up with detailed topo maps of Australia and of any international location I’m heading to. With the right maps it will even give turn-by-turn routing instructions, but I don’t use it for that. I have it set to continually record my locations to the microSD card, and it has enough room for months of travel. It creates a GPX file for each day’s data (GPX is an XML data format that’s understood by probably 99% of GPS/mapping software) which I can easily copy to the computer over USB.

Celestial Pole over Castle Rock
24° 52’12” S, 133° 49’52” E
EOS 20D, 17-40mm/4 (F1_2EFC)
I do use the GPS for general navigation tasks, in-car and on-foot. I’ve built up a sizeable database of interesting locations in the GPS (including points recorded with my earlier units). If I’m driving somewhere and see an interesting location but don’t have time to stop I will usually at least record a specific “waypoint”. Several times on trips I’ve noticed on the unit’s map that we’re approaching a waypoint from an earlier trip. I haven’t always remembered what it was about until I’ve arrived, but it’s usually turned out to be worth a stop.
On-foot navigation includes finding where my tripod is in the dark when shooting star trails. The camera’s been operating for hours, and you’re out of your tent and wandering off to find it before dawn and dew ruin the photos. Being able to find your tripod in the dark without accidentally shining a torch towards the lens is very useful!
Geotagging your photos
Once you’ve got your photos and your GPS log, it’s time to correlate them. Most tagging software allows you to do this and embed the locations into the photo’s metadata so that when you import the photos to your favourite management software the data is available. Some software (e.g. Image Ingester, Downloader Pro) do the tagging for you while the photos are being copied from the flash card.
But this scenario rarely makes sense for me. I record GPS data, I shoot photos, I import the photos to the computer and start managing them with Lightroom immediately, and at some stage I will download the GPS data onto the computer and want to attach location info to the photos. Having to hold off on using Lightroom until I’ve got the GPS data in the right place just wouldn’t work for me.
For instance after my last Antarctic voyage I had logs from my eTrex that covered most of my onshore excursions and much of the ship’s movements, but there were large gaps where I had no GPS data (sometimes because I’d been in a location where the steel structure of the ship blocked the GPS signals). Through the 4 weeks of my travels I used Lightroom most days to manage the thousands of photos I was taking. After each burst of shooting (a Zodiac excursion, a whale sighting, passage through the Lemaire Channel, etc) I usually cycled full cards through the card reader in my cabin onto duplicate hard drives so I could go back out and be confident I wasn’t going to run out of space.

Above and Below
66° 1’3″ S, 65° 24’9″ W
EOS 40D, 100-400mm (A2_012074)
On my busiest day in Antarctica I took around 2900 photos, and although I was using a 16 GB CF card, an 8 GB, and an assortment of 2 GB and 4 GB cards (spread across 4 cameras: a 5DmkII, a 40D, a G9, and an IR body) I wouldn’t have had enough room on the cards for that whole day’s work. There definitely wasn’t opportunity to download GPS data before importing photos. I needed to be able to use Lightroom to review and work on the day’s photos whenever I had a chance: geotagging photos on the day was a complication I would not have enjoyed. Every couple of days or week, sure.
Incidentally, once I got home I received a copy of the ship’s own GPS log, which I was then able to use to fill in the gaps in my own GPS data.
Geotagging within Lightroom
So for me it’s normal procedure to geo-tag my photos once they’re “inside” Lightroom, and for this I use Jeffrey Friedl’s GPS Support Lightroom plug-in. Inside Lightroom you just select the images you want to geotag, invoke the plug-in and point it at a GPX file. Because of the current structure of Lightroom’s plug-in API there’s a multi-step process required if you then want to embed the location data back to the underlying files, but the plugin explains everything. If the clock in your camera was slightly off (the most common cause for this when travelling is forgetting to update devices when you change timezone) you can use Lightroom’s Edit Capture Time function to fix this before using the plug-in to set (or re-set) locations.
Not only can it geotag photos based on a GPS log: you can also enter locations manually or via Google Earth, or even copy from another photo (e.g. a photo taken at the same location with your iPhone 3G).
Lightroom has a built-in function to call up Google or Yahoo Maps in your web browser looking at the current photo’s location, but Jeffrey’s plug-in also allows you to pass it over to local programs such as Google Earth.
When I came back from Antarctica I already had around 12,000 photos remaining in a Lightroom catalog, had done basic editing on many of them and applied many of the appropriate keywords (it’s amazing how much you can get done waiting for hours in airport lounges with a laptop). Once I geotagged the photos it was a simple task to use Google Earth along with British Antarctic Survey maps (and tourist maps of our other destinations including Easter Island) to accurately identify each location and attach appropriate text metadata. And if I’m ever wondering exactly where a particular photo was taken I just have to click a button and the wonder that is Google Earth will remind me.

If you’re using Adobe Lightroom and you’re interested in geotagging, have a look at Jeffrey’s plug-in!

Leave a Reply