[Solved] Locate photos based on a GPS track without synchronization with the camera

Hi there!

I more or less regularly need to find where a particular photo was taken with my camera.

So far I get:

  1. the date/time the photo was taken: it appears in the EXIFs (don’t mind the timezone, it’s not the purpose).

  2. a GPX track that my smartphone records every X minutes and sends regularly to my personal cloud (Nextcloud PhoneTrack App).

There is no particular sync between the moment I press the shutter button on my camera and PhoneTrack on my smartphone.

So I can have, for example:

  • on the camera at the time of the photo: 09/24/2026 10:03:20
  • in the GPX file a point at: 09/24/2026 10:01:00

The gap can of course be more or less significant.

When, in Map > Geotagging I import the GPX file, I will not have a match between the capture Date/Time and the GPS track. The photo will therefore not be geolocated.

How do I get around it, while waiting for something better?

I open the GPX file in a text editor and look for the date/time closest to when the photo was taken.
I then report the corresponding lat/lon coordinates in OpenStreetMap.com and I have a location on a map, often very close to reality. :+1:

I should be able to automate this more or less, but I was wondering if there isn’t another simpler method?
A method that excludes any degenerative AI and/or GAFAM solution, I should specify. :roll_eyes:

No expert here as I do not (yet) use such functions.
Would not it be simple to start the gps tracker and at the very same moment press the shutter button. Then you’ll have the exact time difference between both pieces of equipment. You’ll then have to find out how to add/substract this difference from one or the other. EXIV perhaps?

I use the free app GeoSetter for exactly this. It’s very old, but quite powerful for adjusting all kinds of EXIF data, including geotagging.

1 Like

Thanks @Jetze for the message.

PhoneTrack (PhoneTrack - Apps - App Store - Nextcloud and PhoneTrack | F-Droid - Free and Open Source Android App Repository) takes every X seconds or minutes a geolocalization point. When it’s possible, the phone app sends its lastest points to my NC server.

It works all the time (and it handles redundant points, but that’s not the purpose).

The suggestion of having him take a GPS point every time I take a photo seems excluded to me. :grinning:

Sorry, I use Linux.

And, if there’s an equivalent Linux app, does it fetch the GPS geotagging in a GPX file?

Wouldn’t it work through Wine?
As for how it works: the gpx file contains waypoints, each having a timestamp and a location. All you need to do is interpolate between those points, and that’s exactly what it does.
Actually I’m surprised Darktable can’t do this, but I never tried: I only use the darkroom part, I never understood the need for an organizer built into a raw editor.

1 Like

I suggested only to make one picture at the moment of starting the walk or photosession. Thus knowing the time difference between two pieces of equipment. It does not solve the uncertainty of where exactly a picture is taken in time between two Geo-points .

I use exiftool -geotag '20260920-085402 - Photo.gpx' -overwrite_original *.RAF.

You can adjust the time window between gpx entry and photo datetime, up to 30 minutes, so it should be enough for your situation.

Some people are picky because exiftool re-writes your file with the new metadata, but I haven’t had any issues and trust it with my files.

I use a FOSS app which records every 5 seconds, the files are really small even for large sessions so accuracy is pretty good.

Ah forget it, I must have missed and/or messed something! My bad… :unamused:

Darktable handles it well, in fact.

Here are two illustrations to show how it does it well.

In this 1st picture you see the GPS tracking as of PhoneTrack GPX file tells me:

The point the red cross isolates is at 11:24:14, the previous one at 11:20:27.

This 2nd picture is from Map, in darktable :

And the photo is the one where you see 1. It was taken at 10:23:20.

1 Like

What kind of camera do you have? I have a GPS receiver on my Nikon DSLR, no need for synchronising with a phone.

1 Like

I own a SONY α7 III.

I had it on my Pentax K3 II… but always turned it off since it consumed too much power. :neutral_face:

Anyway, that was not the point and I hope you enjoy shooting with whatever you use.

1 Like

Most geotagging software will interpolate between two times in the GPX file.

I use geotagging often, with either files from RunKeeper or All Trails.

If you have a GPX file, you can use exiftool, but there is also a geotagging module in darktable that can handle GPX files.

What is just very very important, is that you have set the time zone of your camera correctly or explicit to UTC

1 Like

There is a switch that tells exiftool to write your GPS coordinates to an xmp file, that way you don’t have to modify your original!

I set the time on my camera to the time on my phone before I start shooting and it is close enough to the GPS time. I set the time on my camera before every shoot.

darktable also has an offset function in the GPS module.

2 Likes

As you may have seen, or not, this topic is solved on my side. :blush:

I messed with the gpx file and it had nothing to do with the time zones here and there.

My apologies for the inconvenience.

1 Like

Glad you solved it! And as always I learn new things following such threads…

1 Like

@manu sure, but there are many ways to solve a problem. Feel free to disregard what I’ve said.

I write here not only for you, but for others who face a similar problem in the future.

3 Likes

Most appreciated!

There was no “problem” apart my messing with the GPX file.

If you have a GPX file that covers the time period you took the photo, that’s fine, darktable will position it on the map where it was taken.

Just as @martinus wrote.

Yes, but that function assumes that the time in your gpx file and the time on your camera are in sync.

When I read your post, you seemed to indicate that they were not in sync, which might cause the interpolation to be incorrect, that’s why I wrote about the time offset feature, which let’s you set an amount of time to add/subtract from the time in your raw file, so that the GPS time and camera time are insync. For instance, I’ve put the wrong year and month in my camera before. This feature allowed me to fix it.

1 Like

You can get similar issues when one of the two devices uses UTC and the other local time.
Both timestamps are correct, but photo locations won’t be correct…

Although then the difference will be a few hours at most (up to 12 either way, if I’m not mistaken).