Written on 07/03/18 by Paul Oldham

Retrospective Geotagging

Some modern cameras, and a lot of mobile phones, geotag photos which is to say that they add the location where the photo was taken to the EXIF data recorded with the photo. Of course doing that requires that the camera has a GPS built in. Phones pretty much always do, cameras not so much.

Neither of my Sony E-mount cameras have a GPS on board. That's probably a good thing as it does put an extra load on the battery and in any case I've usually got a dedicated GPS with me which is quietly recording my track.

And 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 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 at the time) 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 application, 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 more or less 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 Point

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.

If you fancy doing this too and you're not a Linux user then there's lots of similar programs for other operating systems like Windows (e.g. Lightroom) so just Google about and you should find something suitable.

Tagged: GPS


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.