I more or less regularly need to find where a particular photo was taken with my camera.
So far I get:
the date/time the photo was taken: it appears in the EXIFs (don’t mind the timezone, it’s not the purpose).
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.
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.
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?
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.
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 .
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.
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.
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).