Written on 26/11/14 by Paul Oldham

Retrospectively adding GPS EXIF data

Ever on the lookout for new gizmos to waste my money on I was looking at a GPS device for my Nikon SLR a while ago (Opteka GPN-1, only £34.61 from Amazon at the moment, bargain compared to Nikon's offering) and concluded in the end that it, and all the other similar units, were dubious as you had to have a cable flapping about between the GPS on your hotshoe and the socket on the side of the SLR.

But that got me thinking again about something I'd read about before about retrospectively adding of GPS EXIF data using a GPX track recorded while you were taking your photos. There's tools available to do this on the web and on most operating systems. For example here's some free possibilities for use on your PC:

Adobe Lightroom can apparently do it too if you have a subscription for that but we use Linux here so I looked at the possibilities there and gpscorrelate looked promising (that's the command line version but there's a GUI version too).

As it happened I had a test case handy: some photos I'd taken back in 2010 on a walk up Whernside for which I had a GPX file (see the walk report I wrote a while ago) so I had a play.

First I picked a photo for which I had a very accurate location (the Whernside trig point) and looked at the time data according to that. Then I loaded the track into our GPX mapping software, went into track mode, and clicked on the trig point which moved the "walker" to that location and let me read off the time at that point according to the GPX file. The difference was 3500 seconds (so my camera must have been on BST, unsurprisingly) so then all I had to do was:

    gpscorrelate -v -g whernside.gpx -O -3500 p*.jpg

And it wrote EXIF GPS data to all the photos in that album which were on the track (the offset had to be negative, as I discovered then first time when I got it wrong and used -O 3500).

So now when you look at the photos in the original album you'll see that all the photos of the Whernside walk are correctly geotagged and there's a little map at the bottom of each page. In particular here's that trig point and, as you can see, the map below is spot on.

Whernside Trig PointWjernside Trig Point location map

So that's rather cool I think: geotagging photos for free, assuming you've got a GPS track of your walk.

And lots of photo sites now support geotagging when they're displaying photos, like Flickr (where geotagged photos are automatically added to your map) and blipfoto so if you want to log where you took your photos on a map this is the easy way to do it, assuming you have a GPS track to hand.


You can comment on this post in our forum.

WalkLakes recognises that hill walking, or walking in the mountains, is an activity with a danger of personal injury or death.
Participants in these activities should be aware of and accept these risks and be responsible for their own actions.