Lightroom, Geolocation and .GPX files

UPDATE: December 12, 2018:

As of November 30, if you have any version of Lr older than Lr 8 CC, the Maps module will no longer work. As I understand it, Google updated their API key and Adobe had already claimed it would no longer support older versions. So, if you’re renting Lr via subscription, run the updater and it should be all good. If you have a standalone version of Lr, all is not lost. Jeffrey Friedl has a plugin for Lr that enables geolocation support and is much more powerful than the Lr Map module was anyway. More here:

Jeffrey’s “Geoencoding Support” Plugin for Lightroom

_____

Hi Folks:

Welcome to our first blog post about Lightroom 4! (LR 4 Beta at this point).  A number of tutorials and videos are already available about the new features of LR 4; you can find several of them on our ‘Lightroom Links‘ page.  One of the new features in Lightroom 4 is the ‘Map’ module, and if your computer is connected to the internet the Map module will connect with Google Earth, read each image’s metadata and overlay a map of the earth (or portion thereof) with the location where your images were made.  It’s not a feature I’ll likely use much, but I can see its use in certain applications.

In order to use this feature you need to know where your images were made to begin with.  I’ll get to that in a minute, but before I do I wanted to mention quickly what GPS technology is and is not.  You may have seen a movie where someone has a ‘GPS-device’ the size of a grain of rice injected into their body and all of a sudden they can be tracked around the world by satellite.  Nice, but pretty much pure Hollywood.  Basically, if an electronic device is able to pick up a radio signal it’s called a receiver.  If it can send a signal, it’s called a transmitter.  If it can do both, it’s called a transceiver.  A GPS device is a receiver.  The GPS system begins with some two dozen satellites in ‘MEO’ or ‘medium earth orbit’ around the earth.  Each satellite knows where it is and they each send out a signal with a location and a time code (in UT – Universal Time, also known as ‘Zulu Time’ or ‘Greenwich Mean Time’).  Even though light (and electrical signals) travel at roughly 186320 miles/second, the amount of time it takes to receive a signal from one satellite or another will vary depending on the receiver’s location.  Essentially what a GPS receiver does is receive signals from a few satellites (more is better, but that depends on where you are in the world), and by measuring the time differences for the signal to travel from each satellite, the receiver can determine where on the earth it is.  The accuracy of this information depends on several things, including the quality of the signal, the number of satellites and the quality of the receiver.  There are hybrid devices that will receive GPS signals, determine the receiver’s location and then transmit that information by other means, but that’s something else entirely.  Okay, enough about that.  If you want more advanced knowledge, there are innumerable resources available!

Now, in order to work with Lightroom’s map module, each image needs geolocation information.  There are essentially three ways to do this:

1) Some cameras (my cell phone has a camera, for example) have a built-in GPS receiver, and as such they record the geolocation of every photograph they make.  For some cameras, third party GPS receivers are available that plug in to a camera socket and add this geolocation information to every image as it’s made.  That’s one way.  When you import your images into Lightroom and go to the map module, the images’ geolocation will be shown on the map.

Here’s an example showing three images taken nearby using my cell phone, as well as a preview of one of the images (shown by clicking on the icon).

2) If you don’t have geolocation information for your images, all is not lost.  What you can do is simply select an image or images from the bottom image strip and drag the images onto the appropriate location on the map.  Doing so will automatically add geolocation information to the metadata of each image added.  You can of course zoom in or out on the map before placing the images, depending on the level of accuracy required.

3) The first two methods have been covered in good depth on other sites, but there’s one other method that hasn’t been covered as much, and that’s to use a GPS receiver without linking it to the camera.  That’s really the essence of this blog post.  Since a GPS receiver is recording both the time and the location of the receiver at that time, if you move the receiver and it takes another reading it will have a new time and a new location for that data point.  Join those two location ‘dots’ together with a line and you have the beginnings of a ‘track’.  Virtually all GPS receivers have the ability to record such ‘track’ information and can output that information into a text file called a .gpx file.  A .gpx file is basically a list showing date/time and geolocation in Latitude/Longitude.  Here’s an example of a data point from a .gpx file:

<trkpt lat=”48.48452″ lon=”-123.38307″><ele>8</ele><time>2012-01-19T23:18:28Z</time></trkpt>

This is simple HTML code showing the location (lat/long in degrees and elevation change in feet) for a specific date and time (UT).

What you can do with this information is link the location/time data from the .gpx file with the date/time that the images were taken and assign the geolocation information to the images.

NB: In case it’s not immediately obvious, for this to work you need to coordinate the clocks of your camera and your GPS receiver.  We’re not talking millisecond accuracy, but if the two clocks are off by five or ten minutes, the assigned locations are also going to be off.  If you forget to do this, you can shift the capture time of the images in Lightroom after uploading.  More on that later.

So, the first thing (after returning from your outing) is to create the .gpx file from your receiver and transfer it to the computer on which you have Lightroom.  Read your manual if you’re not sure how to do that.  I’ve created a ‘GPX files’ folder inside my Lightroom folder for these files.  Of course, you also need to import the images into Lightroom.

Now, go to the map module, and at the bottom of the screen is a symbol that looks like a squiggle (the Tracklog icon):

If you don’t see it, check your toolbar options to enable it. If you don’t see the toolbar at all, press ‘T’ to reveal it.

Click on the drop arrow beside the Tracklog icon and select ‘Load Tracklog’.  You can also do this from Map/Tracklog/Load Tracklog.  Lightroom will read the file and add the Tracklog information to the map, like this:

Rithet’s Bog

Second, you need to associate the images you made on that trip with the tracklog data.  You do this by selecting the images (either in the Grid module or from the bottom image strip), then clicking on the drop arrow beside the Tracklog icon and selecting ‘Auto-Tag ___ Selected Photos’.  Lightroom will match up the capture times of the images with the tracklog times, add the geolocation information to the metadata for each selected image, then display them on the map, like this:

And you’re done!  Where you have an image icon with a number over it, it means ___ images were taken at that location at that scale on the map.  Zooming in will space the images out, and zooming out to a small enough scale will eventually render them all to one location.  You can turn tracklog visibility on and turn off, although you can only load one tracklog at a time (otherwise it would be challenging to point out which images were to be associated with which tracklog).

A couple of points to note. First, while the GPS location is associated with the metadata of each image, in some cases you may not want this information publicly available: your home, for example, or an ecologically-sensitive area that you don’t want to highlight to people on your favourite social networking sites.  To that end there is a facility to make certain locations ‘private’.  Second, while I mentioned above that you can edit the capture time of your images in Lightrom after importing them, there is something else that may occur in that you may be on vacation or assignment and have moved to a different time zone.  In that case, your GPS receiver will now be recording in local time while your camera may still be recording the time ‘at home’.  To facilitate this, there’s a ‘Set Time Zone Offset’ function in the Tracklog menu.  While the slider for time zone offset defaults to one-hour increments, one can also manually type in an offset.  Going from British Columbia to Newfoundland for example is an offset of 4.5 hours.  This offset feature came in really handy for me the first time I used the Tracklog feature.  I used my walkaround camera to make the images used as examples for this blog post and I used my Android-enabled cell phone as my GPS receiver.  There are a few different GPS apps for Android (including one from ‘Instamapper‘) but the one I used is ‘My Tracks‘ from Google.  Both are free.  So, I went out the first time, recorded a track, made some images, uploaded it all to Lightrom and it linked… none of my images.  Okay… after some head scratching and wondering what I was doing wrong, I discovered there is (was?) a bug in the My Tracks software.  While my phone knew what day it was and the tracklog was labeled with the correct date, the track information within the log was set forward by 24 hours.  Essentially the .gpx file was telling me I had created the log one day in the future.  That would be nice sometimes, but…  What I did was to offset the tracklog by -24 hours and all of my images lined up as they were supposed to.  I sent a message to the folks at My Tracks with a copy of the tracklog to let them know of the bug, but I don’t know if they’ve yet had a chance to fix it.

UPDATE, February 12, 2012: Coincidentally(?), the day after I published this post, there was an update to Google’s My Tracks software on my phone, followed by another update a day or so later.  Curious, I created a track yesterday to see if they’d fixed the problem with the trackpoints being listed one day ahead.  At least in my time zone, they haven’t.  Thought I’d mention it in case anyone from Google is reading this, and I didn’t receive a response to my email!  If it DOES get fixed, I’ll update the post again.

Update, December 15, 2016. Just re-reading this post… Well, Google did get their software fixed, but they’ve since rescinded it. On my current Android phone I’m now using Geo Tracker software. It has some nice features.

One last thing.  As part of the geolocation feature, there’s a new icon on the images in the Lightroom Grid module.  Looking like a push pin, this icon in the bottom of an image means that it has geolocation information.  If you click on the pushpin icon for an image, Lightroom will move to the Map module and display the place where that image was made.

Now go out and make some pictures!

Mike.

P.S. You can find more of our posts on photography and Lightroom tutorials here, and you can find links to over 200 other sites that have Lightroom tips, tutorials and videos here.

6 Replies to “Lightroom, Geolocation and .GPX files”

    1. wolfnowl Post author

      Ron: You are correct. GPS satellites are in ‘MEO’ – Medium Earth Orbit’. I’ve made the appropriate correction. Thanks for taking the time to point out the error, and thanks for dropping by our little corner of the ‘net!

      Mike.

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.