Geotagging Position Interpolation

Started by Rob_Delta, September 12, 2019, 11:35:16 PM

Previous topic - Next topic

Rob_Delta

I tried to find an answer to this in the forum but was unsuccessful.

The manual says - the GPS position is calculated (by interpolating between fixes in the GPS track log)

I have a CSV file created from track data with the following two lines:

01/08/2019,10:13:33,49.081173,-111.634064
01/08/2019,11:14:25,49.091513,-111.621118

After GeoTagging, my image reported

exiftool -p '$DateTimeOriginal $GPSLatitude# $GPSLongitude#' 101.jpg
2019:08:01 11:08:16 49.091513 -111.621118

The geotagged image position is exactly that recorded in the track log at time 11:14:25 so it seems to have been tagged with the "closest" fix to the image time, or perhaps the "next" fix relative to the image time, but it is not "interpolated" between these two fixes as I understand it.  Is this correct?  I haven't had time to investigate other images, but many seem a bit off position wise after geotagging.  I'm wondering if I have to start with a list of image times and do my own position interpolation to create a CSV file that contains only exact time matches and interpolated positions for each image before geotagging.

Thanks for any help or suggestions.

StarGeek

What is the command you are using to geo tag with?  Can you attach your csv file?

Geotagging isn't my area of expertise, but I created a csv file with the lines you indicate and exiftool can't read it.  So there's something missing. 

From what I can tell, if you're using a plain CSV file to embed the data using a command like -csv=Track.csv, then that is not using the procedure to get an interpolating GPS location.  The only CSV geotrack log that exiftool can read is the GPS/IMU .CSV format, of which there is an example here.

To get an interpolating result, you need to use the Geotag option which requires a GPS track log in one of the formats listed on the Geotagging with ExifTool
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Rob_Delta

I apologize for an incomplete posting.

The command I used was

exiftool  -geotag /home/robert/Documents/GEOTAG/Cardston_to_Hanna.csv -geosync=-07:00:00  /home/robert/Documents/GEOTAG/ToDoNikon

When I run the command I get:

    1 directories scanned
    1 image files updated


The CSV file is attached.  The two lines I first posted were just the two that bracketed the example image timestamp.  I am basing my approach to geotagging with a CSV format tracklog  based on a forum posting which was:


Re: Feature Request - GPS/IMU data format - POS
« Reply #4 on: July 02, 2019, 01:02:09 PM »

ExifTool should be flexible about the information included in the CSV file, and you will be able to geotag from any CSV as long as it can
recognize date/time and lat/lon headings somewhere in the first line of the file, and provided the date formatting is "DD/MM/YYYY".

- Phil


Everything works without reporting errors, I'm just trying to determine if exiftool is, or should be, interpolating between tracklog fixes as suggested in the documentation, or if it just finds and uses the position at the closest time to the image time?

If I use my original example two data lines, I expected that exiftool would calculate an interpolated intermediate position for time 11:08:16 about 90% of the distance between the two recorded fixes as

01/08/2019,10:13:33,49.081173,-111.634064
                   (11:08:16) 49.090468 -111.622426  <- expected interpolated position
01/08/2019,11:14:25,49.091513,-111.621118    <- the position actually used by exiftool for my example image

I'm using Exiftool 11.65 running on Linux Mint 19.2

olball

Quote from: Rob_Delta on September 13, 2019, 01:48:24 PM
01/08/2019,10:13:33,49.081173,-111.634064
                   (11:08:16) 49.090468 -111.622426  <- expected interpolated position
01/08/2019,11:14:25,49.091513,-111.621118    <- the position actually used by exiftool for my example image

The time difference between both fixes is more than one hour. This is more then the interpolation limit (option GeoMaxIntSecs)

From the geotagging page StarGeek already linked (https://exiftool.org/geotag.html#Options)
Quote
GeoMaxIntSecs
Maximum interpolation time in seconds for geotagging. Geotagging is treated as an extrapolation if the Geotime value lies between two fixes in the same track which are separated by a number of seconds greater than this. Otherwise, the coordinates are calculated as a linear interpolation between the nearest fixes on either side of the Geotime value. Set to 0 to disable interpolation and use the coordinates of the nearest fix instead (provided it is within GeoMaxExtSecs, otherwise geotagging fails).

So I think the behavior is consistent with the documentation. So if you want to enforce the interpolation for this big time span you need to set the GeoMaxIntSecs option to a bigger value.

StarGeek

Thank you for all that.

Additionally, I took your first example and made a GPX track out of it and came to the same results.

Unfortunately, this is going to require input from Phil, who is currently on vacation until late September.  I'd suggest hitting the "Notify" button in the upper right corner of this thread to get an email when there's a response.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Rob_Delta

Thank you to olball for the reply and guidance. 

I must admit that I sometimes have difficulty getting answers from the technical jargon in manuals, but after you explained the significance of a large time interval and the use of GeoMaxIntSecs it all seems clear enough.

I think this question should be considered answered and closed.