Retrospectively adding GPS EXIF data


Forum » General Forums » Mapping

By TallPaul on 17/01/14 at 12:01pm

Ever on the lookout for new gizmos to waste my money on I was looking at a GPS device for my Nikon SLR today (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 track1 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 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.

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.

  1. A track records where you have been and when you were there. For more information click here.

By TallPaul on 17/01/14 at 12:20pm

Oh yes, and a useful suggestion I read somewhere on this subject. If you know you're going to do this then before you start your walk:

  1. Set the time and date on your camera (good practise anyway as it does tend to drift and it's nice to have it right in the EXIF data).

  2. Photograph your GPS while it's displaying the time. Then you don't need to mess about using our software to work out the error, you just compare the offset between the EXIF data and what your GPS was showing at the time the photo was taken.


By SheepFarmer on 28/02/17 at 1:50pm

An alternate program that can also Geotag photo's is Garmin's Basecamp (Windows only) which is free and uses a GUI and has the time shift option that works well with the photo'ing of your GPS unit. Just right click your track and pick "Geotag Photos using Track..." etc. You can pick a whole folder & it only applies coordinates to the pics whose time matches the track & ignores the others.

For displaying them Goggle's Picasa photo manager can show map or satellite view alongside the pics with marker, although it's no longer being supported, as they want you to use there new online app.

I have a compact Panasonic camera with in built GPS but my garmin etrex unit is much more accurate and the GPS in the camera when on, adds to battery drain.


By wintonian on 01/03/17 at 7:50am

Not tried tagging with it yet but the excellent Darktable (https://www.darktable.org/usermanual/ch02s03s09.html.php) (available for all good operating systems ;) ) will sync the gps data and either semi-automaticaly calculate the time drift, using a image of a clock, or it can be entered manually.



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.