Author Topic: No track points found in GPS file  (Read 202 times)

Patric Schmitz

  • Newbie
  • *
  • Posts: 4
No track points found in GPS file
« on: August 03, 2020, 02:38:41 PM »
Dear Forum,

this is my first time working with exiftool, so please excuse any stupidity.

I am trying to geotag an image with the interpolated position from a GPS log file. No matter how I format the file, however, I receive "No track points found in GPS file" and 0 points are loaded.

The log file looks as follows (and variants thereof):

GPSDateTime,GPSLatitude,GPSLongitude
2020:07:30 11:48:59,50.7886837 N,6.0468592 E
2020:07:30 11:48:59,50.7886837 N,6.0468592 E
2020:07:30 11:48:59,50.7886836 N,6.0468591 E
...


and I call exiftool as:

exiftool -v -geotag=run3-lon-30m/gps-converted.txt test.tiff


I realize that the timestamps are not unique, might that be a problem? I am working with a dataset where we acquire ~5 images per second. I also tried to provide hundredth of seconds with a trailing .XX, which makes them unique, but that did not change anything.

The test.tiff has no GPS tags set, I called exiftool with -geotag= to make sure. Furthermore, for testing I manually set

DateTimeOriginal                : 2020:07:30 12:00:00

using exiftool.

Using the verbose option I get the following output

Loaded 0 points from unknown-format GPS track log file 'run3-lon-30m/gps-converted.txt'
Warning: No track points found in GPS file 'run3-lon-30m/gps-converted.txt' in File:Geotag (ValueConvInv)
...


I tried a number of variants of the input formatting, of which all should have been in line with https://exiftool.org/geotag.html#CSVFormat. I keep getting the above error though, so I assume that I'm missing something more fundamental.

EDIT: my platform information, running on an Ubuntu 20.04 machine.

ExifTool version 11.88
Perl version 5.030000 (-C0)
Platform: linux
Optional libraries:
  Archive::Zip                 1.67
  Compress::Zlib               2.084
  Digest::MD5                  2.55
  Digest::SHA                  6.02
  IO::Compress::Bzip2          2.084
  POSIX::strptime              0.13
  Unicode::LineBreak           2019.001
  IO::Compress::RawDeflate     2.084
  IO::Uncompress::RawInflate   2.084


Thank you,
Patric

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 3951
Re: No track points found in GPS file
« Reply #1 on: August 03, 2020, 04:22:09 PM »
First, update your version of exiftool.  From the versions page
Quote
Apr. 23, 2020 - Version 11.95
    Enhanced -geotag feature to support a more flexible input CSV file format

When I test your data with ver 11.85, I get no updates.  With the current version, it worked.

Then there might be a second problem.  Geotag Troubleshooting #2.  You're not accounting for possible time zone difference.  The timestamps in a GPS Track are supposed to be UTC.  But the timestamps in images are assumed to be local time zone if there's no timezone data.  So your test image set to 12:00 won't match the times in your example track unless you are in a +00:00 time zone (I think, something like that).  You'll need to adjust the time either with the GeoTime tag or the GeoSync option.

Example output.  The first attempt fails because it doesn't include my -07:00 time zone.
Code: [Select]
C:\>type Y:\!temp\aaa\gpstrack.txt
GPSDateTime,GPSLatitude,GPSLongitude
2020:07:30 11:48:59,50.7886837 N,6.0468592 E
2020:07:30 11:48:59,50.7886837 N,6.0468592 E
2020:07:30 11:48:59,50.7886836 N,6.0468591 E

C:\>exiftool -g1 -a -s -DateTimeOriginal Y:\!temp\aaa\Test1.jpg
---- ExifIFD ----
DateTimeOriginal                : 2020:07:30 12:00:00

C:\>exiftool -P -overwrite_original -geotag=Y:\!temp\aaa\gpstrack.txt Y:\!temp\aaa\Test1.jpg
Warning: Time is too far beyond track in File:Geotime (ValueConvInv) - Y:/!temp/aaa/Test1.jpg
Warning: No writable tags set from Y:/!temp/aaa/Test1.jpg
    0 image files updated
    1 image files unchanged

C:\>exiftool -P -overwrite_original -geosync=-7:0:0 -geotag=Y:\!temp\aaa\gpstrack.txt Y:\!temp\aaa\Test1.jpg
    1 image files updated

C:\>exiftool -g1 -a -s -gps* -DateTimeOriginal Y:\!temp\aaa\Test1.jpg
---- ExifIFD ----
DateTimeOriginal                : 2020:07:30 12:00:00
---- GPS ----
GPSVersionID                    : 2.3.0.0
GPSLatitudeRef                  : North
GPSLatitude                     : 50 deg 47' 19.26"
GPSLongitudeRef                 : East
GPSLongitude                    : 6 deg 2' 48.69"
GPSTimeStamp                    : 12:00:00
GPSDateStamp                    : 2020:07:30
---- Composite ----
GPSDateTime                     : 2020:07:30 12:00:00Z
GPSLatitude                     : 50 deg 47' 19.26" N
GPSLongitude                    : 6 deg 2' 48.69" E
GPSPosition                     : 50 deg 47' 19.26" N, 6 deg 2' 48.69" E
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

Patric Schmitz

  • Newbie
  • *
  • Posts: 4
Re: No track points found in GPS file
« Reply #2 on: August 04, 2020, 03:06:59 PM »
Hi StarGeek,

thank you very much for the hint with the newer version, upgrading indeed makes the GPS points be read correctly.

Interestingly, letting the timezone issue aside for a moment, setting the DateTimeOriginal tag with the syntax that I used before does not work anymore with that version.

pschmitz@elw-ws:/data/reconstruction$ /usr/bin/exiftool -exif:DateTimeOriginal="2020:07:30 12:00:00" test.tiff
    1 image files updated
pschmitz@elw-ws:/data/reconstruction$ exiftool -exif:DateTimeOriginal="2020:07:30 12:00:00" test.tiff
Warning: Invalid date/time (use YYYY:mm:dd HH:MM:SS[.ss][+/-HH:MM|Z]) in ExifIFD:DateTimeOriginal (PrintConvInv)
Nothing to do.

The first call uses the system-wide older version, and the second one the version in my PATH which is the current master (also tried 12.03). If the syntax should still be supported (according to the warning it should) I will file an issue for this.

Another issue that I found is that I cannot call exiftool from its source tree by using a symbolic link. The script appends the ./lib folder relative to the path of the symlink, and not to the perl script that is being pointed to inside the source tree. This is a minor issue that I could easily work around with a wrapper script, but if you like I'll also file an issue for that.

Using the correct geosync option for my CEST time zone I was able to get my images properly annotated with a GPS position!  :)

Thank you,
Patric

 

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16878
    • ExifTool Home Page
Re: No track points found in GPS file
« Reply #3 on: August 04, 2020, 03:48:52 PM »
Hi Patric,

Your command to set DateTimeOriginal works for me with the current version of ExifTool.  I can't imagine what could cause the problem you see unless you have a corrupted installation somehow.

Regarding the symlink problem, maybe try the Alternate Windows ExifTool version to see how that behaves.  Using this version could also solve the DateTimeOriginal problem if it was due to a corrupted installation.

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

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 3951
Re: No track points found in GPS file
« Reply #4 on: August 04, 2020, 04:04:25 PM »
Your command to set DateTimeOriginal works for me with the current version of ExifTool.  I can't imagine what could cause the problem you see unless you have a corrupted installation somehow.

Same here.  Something else must be going on.

Do other simple commands work?  For example,
exiftool -description=test /path/to/file/

Also, check to see if there's problems with the tiff file
exiftool -a -validate -warning /path/to/file/

Quote
Regarding the symlink problem, maybe try the Alternate Windows ExifTool version to see how that behaves.  Using this version could also solve the DateTimeOriginal problem if it was due to a corrupted installation.

They're on Linux.
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

Patric Schmitz

  • Newbie
  • *
  • Posts: 4
Re: No track points found in GPS file
« Reply #5 on: August 04, 2020, 04:35:48 PM »
Setting the description works without problems. When I validate the exif file I get 4 warnings which seem unrelated

Validate                        : 4 Warnings (1 minor)
Warning                         : [minor] ExifIFD tag 0x9101 ComponentsConfiguration is not allowed in TIFF
Warning                         : Missing required TIFF GPS tag 0x001b GPSProcessingMethod
Warning                         : Missing required TIFF IFD0 tag 0x011a XResolution
Warning                         : Missing required TIFF IFD0 tag 0x011b YResolution

Note that this is after geotagging with exiftool so those warnings might be interesting either way.

Regarding the symlink issue, I checked the script and it appends the ./lib path relative to argv[0]. There seems to be some possibility to pass an execution path with -xpath however I don't know enough perl to decipher what exactly is happening there.  ;) The issue should be solved by getting the canonical path name of the executable using https://perldoc.perl.org/Cwd.html#abs_path-and-friends for example.

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 3951
Re: No track points found in GPS file
« Reply #6 on: August 04, 2020, 05:55:31 PM »
Setting the description works without problems. When I validate the exif file I get 4 warnings which seem unrelated

The Description tag isn't part of the EXIF group, so any problem with the EXIF block wouldn't affect it.
Quote

Validate                        : 4 Warnings (1 minor)
Warning                         : [minor] ExifIFD tag 0x9101 ComponentsConfiguration is not allowed in TIFF
Warning                         : Missing required TIFF GPS tag 0x001b GPSProcessingMethod
Warning                         : Missing required TIFF IFD0 tag 0x011a XResolution
Warning                         : Missing required TIFF IFD0 tag 0x011b YResolution

All four of these warnings are part of the EXIF group.  If it were a JPG, I'd say run the command in FAQ #20 to see if it works, but for a TIF file, it may be a problem.  As per the note, there's a chance of image corruption.
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

dae65

  • Full Member
  • ***
  • Posts: 77
Re: No track points found in GPS file
« Reply #7 on: August 04, 2020, 08:18:45 PM »
Another issue that I found is that I cannot call exiftool from its source tree by using a symbolic link. The script appends the ./lib folder relative to the path of the symlink, and not to the perl script that is being pointed to inside the source tree.
Symlinks to Perl scripts change nothing as to where the Perl interpreter will look for modules to load. Try:
Code: [Select]
$ export PERL5LIB=/path/to/exiftool/source/tree/lib
$ exiftool -ver
If this works, you'll need to export that variable over again in any other shell.

Patric Schmitz

  • Newbie
  • *
  • Posts: 4
Re: No track points found in GPS file
« Reply #8 on: August 05, 2020, 04:19:40 AM »
Thanks dae65, that works. If I use a symlink plus setting the PERL5LIB in the environment. It locates the Image::ExifTool only if I set the variable. I removed the system-wide deployed version to make sure that it fails otherwise. In that case, the date/time syntax also works.

I was referring to https://github.com/exiftool/exiftool/blob/master/exiftool#L15-L30 where exiftool adds the ./lib directory relative to the executable path. I was proposing to wrap the path in a call to abs_path in order to get the canonical path name and not the name under which the executable is called (the symlink path). As far as I understand, this should make setting the PERL5LIB variable no longer necessary, even if the script is called under a different name/path.

I just found the error with the date/time format problem. It was  actually caused by the wrapper that I wrote to be able to call the script from my user bin directory ($HOME/bin), which simply calls the executable in place:

#!/bin/bash
~/src/exiftool/exiftool $*

Turns out I messed up the quoting of the positional parameters, which should read "$@". Sorry for that!
 
Thank all of you for your support!