How does exiftool determine which files to write GPS info?

Started by remarkableearth, December 07, 2017, 12:29:16 PM

Previous topic - Next topic

remarkableearth

I have multiple GPX logs in a directory, alongside multiple other directories containing image files (over 10,000). My images were all taken within a short time period by many people and could very well have identical timestamps among them.

I read through the documentation on Geotagging and GPS tags and understand how GPS tags are written to images based upon a linear interpolation of the timestamp data. I also understand exiftool can combine multiple track logs and geotag an entire directory tree of images (eg, exiftool -geotag a.log -geotag b.log -r dir) so clearly the GPX logs don't have to reside in the same directory/subdirectory as the image files.

Aside from the timestamp data alone, how does exiftool know which files to write to if timestamp data is identical among image files?

Does exiftool write the GPS data to all files with identical timestamp data or does it choose among files? If it chooses, how do I influence that choice, assuming I know which GPS data goes with which image?

Phil Harvey

ExifTool will interpolate/extrapolate within loaded GPS tracks to find the exact position at the time of each image.  The geotagging will fail only if there is no time available or the time is outside the range set by GeoMaxIntSecs and GeoMaxExtSecs (see here for details).

The only constraint is that the GPS logs must not have overlapping time ranges at different locations.  ie) you are fine if all the logs are from the same GPS receiver.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

remarkableearth

Thank you, Phil. Your response makes sense.

I tested the writing of the GPS tags from one of the GPX files using exiftool -geotag 'file name with spaces.GPX' -r /dir/subdirA/subdirB. Of course, I didn't know ahead of doing it which files it would write to so I had to test it over the entirety of the files (+10,000) and to my chagrin it didn't write them to any files (nor did I get an error).

Assuming I got a bad result and that there should have been GPS data written to files within that directory tree, what do you recommend I do to troubleshoot why I got no result?

Phil Harvey

Start adding -v options to the command until you get enough details to see what is happening.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).