Created GPX via Inverse Geotagging; used it and get "No track points..."

Started by Tempest Character, May 16, 2019, 07:41:26 PM

Previous topic - Next topic

Tempest Character

Visiting Mt. Vernon and my geotagging app malfunctioned, so I tagged some pictures manually using Google Maps -- and used inverse geotagging (per https://exiftool.org/geotag.html#Inverse) to create a GPX file.  I was thus hoping that the GPX file could now be used to geotag other pictures there (per https://exiftool.org/geotag.html).  However, I get these errors for each jpg like this:

QuoteWarning: No track points found in GPS file 'GPX\Vernon.gpx' in File:Geotag (ValueConvInv)
Warning: GPS track is empty in File:Geotime (ValueConvInv) - 00345.jpg
Warning: No writable tags set from 00345.jpg
...

You write in the latter webpage, "If you see the above message, either exiftool does not yet support your track log file format, or your track log does not contain the necessary position/timestamp information. ... If you believe your track log contains the necessary information, please send me a sample file and I will add support for this format."

Are you saying you don't support the GPX file created by your Inverse Geotagging process?  The GPX file in question is as follows:

<?xml version="1.0" encoding="utf-8"?>
<gpx version="1.0"
creator="ExifTool 10.42"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.topografix.com/GPX/1/0"
xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd">
<trk>
<number>1</number>
<trkseg>
<trkpt lat="38.709937" lon="-77.0872362000055">
  <ele>14</ele>
  <time>2019:04:18 16:56:07Z</time>
</trkpt>
<trkpt lat="38.7078363000056" lon="-77.0866583">
  <ele>14</ele>
  <time>2019:04:18 17:05:46Z</time>
</trkpt>
<trkpt lat="38.7078363000056" lon="-77.0866583">
  <ele>14</ele>
  <time>2019:04:18 17:04:28Z</time>
</trkpt>
<trkpt lat="38.7078363000056" lon="-77.0866583">
  <ele>14</ele>
  <time>2019:04:18 17:04:41Z</time>
</trkpt>
<trkpt lat="38.708243" lon="-77.0865621999889">
  <ele>14</ele>
  <time>2019:04:18 17:09:33Z</time>
</trkpt>
<trkpt lat="38.708387" lon="-77.0867481999944">
  <ele>14</ele>
  <time>2019:04:18 17:11:00Z</time>
</trkpt>
<trkpt lat="38.708495" lon="-77.0867652000194">
  <ele>14</ele>
  <time>2019:04:18 17:12:03Z</time>
</trkpt>
<trkpt lat="38.70878" lon="-77.0865601999889">
  <ele>14</ele>
  <time>2019:04:18 17:14:38Z</time>
</trkpt>
<trkpt lat="38.708906" lon="-77.0866641999667">
  <ele>37</ele>
  <time>2019:04:18 17:17:25Z</time>
</trkpt>
<trkpt lat="38.708906" lon="-77.0866641999667">
  <ele>41</ele>
  <time>2019:04:18 17:20:09Z</time>
</trkpt>
<trkpt lat="38.708881" lon="-77.0874712">
  <ele>36</ele>
  <time>2019:04:18 17:25:05Z</time>
</trkpt>
<trkpt lat="38.708881" lon="-77.0874712">
  <ele>36</ele>
  <time>2019:04:18 17:25:10Z</time>
</trkpt>
<trkpt lat="38.708833" lon="-77.0873872">
  <ele>36</ele>
  <time>2019:04:18 17:27:55Z</time>
</trkpt>
<trkpt lat="38.708728" lon="-77.0871772">
  <ele>36</ele>
  <time>2019:04:18 17:29:54Z</time>
</trkpt>
<trkpt lat="38.708267" lon="-77.0870042000139">
  <ele>36</ele>
  <time>2019:04:18 17:31:22Z</time>
</trkpt>
<trkpt lat="38.707961" lon="-77.0871642000222">
  <ele>36</ele>
  <time>2019:04:18 17:32:56Z</time>
</trkpt>
<trkpt lat="38.707852" lon="-77.0872521999806">
  <ele>36</ele>
  <time>2019:04:18 17:34:04Z</time>
</trkpt>
<trkpt lat="38.707594" lon="-77.0875032">
  <ele>36</ele>
  <time>2019:04:18 17:35:29Z</time>
</trkpt>
<trkpt lat="38.707594" lon="-77.0875032">
  <ele>36</ele>
  <time>2019:04:18 17:35:48Z</time>
</trkpt>
<trkpt lat="38.70712" lon="-77.0871721999889">
  <ele>36</ele>
  <time>2019:04:18 17:39:06Z</time>
</trkpt>
<trkpt lat="38.70712" lon="-77.0871721999889">
  <ele>36</ele>
  <time>2019:04:18 17:40:57Z</time>
</trkpt>
<trkpt lat="38.70712" lon="-77.0871721999889">
  <ele>36</ele>
  <time>2019:04:18 17:42:04Z</time>
</trkpt>
<trkpt lat="38.706726" lon="-77.0891332">
  <ele>36</ele>
  <time>2019:04:18 17:44:25Z</time>
</trkpt>
<trkpt lat="38.706796" lon="-77.0893272">
  <ele>36</ele>
  <time>2019:04:18 17:45:11Z</time>
</trkpt>
<trkpt lat="38.706796" lon="-77.0893272">
  <ele>36</ele>
  <time>2019:04:18 17:46:49Z</time>
</trkpt>
<trkpt lat="38.706796" lon="-77.0893272">
  <ele>36</ele>
  <time>2019:04:18 17:47:19Z</time>
</trkpt>
<trkpt lat="38.706796" lon="-77.0893272">
  <ele>36</ele>
  <time>2019:04:18 17:47:32Z</time>
</trkpt>
<trkpt lat="38.706796" lon="-77.0893272">
  <ele>36</ele>
  <time>2019:04:18 17:47:42Z</time>
</trkpt>
<trkpt lat="38.706315" lon="-77.0892838999611">
  <ele>36</ele>
  <time>2019:04:18 17:48:55Z</time>
</trkpt>
<trkpt lat="38.706315" lon="-77.0892838999611">
  <ele>36</ele>
  <time>2019:04:18 17:49:59Z</time>
</trkpt>
<trkpt lat="38.706315" lon="-77.0892838999611">
  <ele>36</ele>
  <time>2019:04:18 17:50:33Z</time>
</trkpt>
<trkpt lat="38.706315" lon="-77.0892838999611">
  <ele>36</ele>
  <time>2019:04:18 17:51:16Z</time>
</trkpt>
<trkpt lat="38.705221" lon="-77.0888322">
  <ele>36</ele>
  <time>2019:04:18 17:56:38Z</time>
</trkpt>
<trkpt lat="38.705231" lon="-77.089206200025">
  <ele>36</ele>
  <time>2019:04:18 17:58:03Z</time>
</trkpt>
<trkpt lat="38.705043" lon="-77.0902492">
  <ele>36</ele>
  <time>2019:04:18 17:59:49Z</time>
</trkpt>
<trkpt lat="38.70632" lon="-77.091433199925">
  <ele>36</ele>
  <time>2019:04:18 18:04:17Z</time>
</trkpt>
<trkpt lat="38.706691" lon="-77.091282">
  <ele>36</ele>
  <time>2019:04:18 18:07:13Z</time>
</trkpt>
<trkpt lat="38.706793" lon="-77.0917792">
  <ele>36</ele>
  <time>2019:04:18 18:07:13Z</time>
</trkpt>
<trkpt lat="38.707292" lon="-77.0915581999917">
  <ele>36</ele>
  <time>2019:04:18 18:08:22Z</time>
</trkpt>
<trkpt lat="38.708147" lon="-77.0909242000611">
  <ele>36</ele>
  <time>2019:04:18 18:13:33Z</time>
</trkpt>
<trkpt lat="38.708144" lon="-77.0903852000139">
  <ele>36</ele>
  <time>2019:04:18 18:17:38Z</time>
</trkpt>
<trkpt lat="38.708144" lon="-77.0903852000139">
  <ele>36</ele>
  <time>2019:04:18 18:18:20Z</time>
</trkpt>
<trkpt lat="38.70819" lon="-77.0894891999778">
  <ele>36</ele>
  <time>2019:04:18 18:19:07Z</time>
</trkpt>
<trkpt lat="38.70819" lon="-77.0894891999778">
  <ele>36</ele>
  <time>2019:04:18 18:19:43Z</time>
</trkpt>
<trkpt lat="38.70819" lon="-77.0894891999778">
  <ele>36</ele>
  <time>2019:04:18 18:20:54Z</time>
</trkpt>
<trkpt lat="38.708059" lon="-77.0888221999917">
  <ele>36</ele>
  <time>2019:04:18 18:23:36Z</time>
</trkpt>
<trkpt lat="38.708059" lon="-77.0888221999917">
  <ele>36</ele>
  <time>2019:04:18 18:23:45Z</time>
</trkpt>
<trkpt lat="38.708059" lon="-77.0888221999917">
  <ele>36</ele>
  <time>2019:04:18 18:24:02Z</time>
</trkpt>
<trkpt lat="38.709705" lon="-77.0874842000083">
  <ele>36</ele>
  <time>2019:04:18 18:29:33Z</time>
</trkpt>
<trkpt lat="38.7098133000083" lon="-77.086987">
  <ele>36</ele>
  <time>2019:04:18 18:31:26Z</time>
</trkpt>
</trkseg>
</trk>
</gpx>


Any suggestions welcome.

Thanks!

StarGeek

What are the time stamps within the images you are trying to geotag?  Additionally, what time zone is the computer you're using set to?

The time stamp in your geotrack is 16:56:07Z, which means that the images should have a time stamp of around 12 noon to 1 PM (12:00 to 13:00).  Additionally, if there isn't time zone data embedded in the file, I believe exiftool will assume the time zone of the computer. 

If the time stamps are correct at the 12 to 13 range, but you're now in a different time zone, I'd suggest setting OffsetTimeOriginal (to -04:00 I believe) and trying again.

If the timestamps are the same as the geotrack time stamps then one or the other has been set wrong and you need to adjust for the differences. 

Remember, the timestamps in a geotrack are always supposed to be UTC.  The time stamps in the images are supposed to be local time to where they were taken.  If DateTimeOriginal, OffsetTimeOriginal and the geotrack timestamps are properly set, it should be able to find the correct track points.

"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Phil Harvey

> exiftool a.jpg -geotag a.gpx -v3
Argument "-Geotime<DateTimeOriginal#" is assumed
Timestamp format error in file 'a.gpx'
Loaded 0 points from XML-format GPS track log file 'a.gpx'


The times need to be formatted like this:

2019-04-18T18:19:07Z

In the example gpx.fmt file, this is done via the DateFmt() function.

- 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 ($).

Tempest Character

StarGeek, Phil Harvey -- I appreciate your quick replies, and ask your compassion and patience in my trying to understand and follow your advice.

As to StarGeek's questions and comments:

(1) Here's an example of one picture's timestamps (taken in East Coast time):

FileModifyDate 2019:04:18 12:57:54-07:00
FileCreateDate 2019:04:18 12:57:54-07:00
DateTimeOriginal 2019:04:18 12:57:53

(2) My computer's time zone is West Coast/Pacific

(3) As to using OffsetTimeOriginal to -04:00 I assume you mean executing the command

exiftool -OffsetTimeOriginal="-04:00" a.jpg

So now we have it set as

OffsetTimeOriginal -04:00

So I run the geotagging again and still get the same problem:

Warning: No track points found in GPS file 'GPX\Vernon.gpx' in File:Geotag (ValueConvInv)
Warning: GPS track is empty in File:Geotime (ValueConvInv) - 00345.jpg
Warning: No writable tags set from 00345.jpg
Warning: GPS track is empty in File:Geotime (ValueConvInv) - 00346.jpg
Warning: No writable tags set from 00346.jpg
...

Now I see that Phil Harvey chimes in recommending that DateFmt() needs to be used (as in the gpx.fmt file) to format as 2019-04-18T18:19:07Z

But what time tag should I apply that to?  DateTimeOriginal?  GeoTime? Something like this:

exiftool -DateTimeOriginal<"$(DateTimeOriginal#; DateFmt("%Y-%m-%dT%H:%M:%SZ"))" a.jpg

I get messages like:

Warning: No writable tags set from ./00348.jpg

Sorry!  I've tried to follow your advice and am still lost.

Help!

StarGeek

Quote from: Tempest Character on May 17, 2019, 02:35:57 PM(3) As to using OffsetTimeOriginal to -04:00 I assume you mean executing the command

exiftool -OffsetTimeOriginal="-04:00" a.jpg

Yep.  You'll definately have to do that for the images.  Otherwise exiftool won't be able to match the time stamps correctly.  Since you're now on the west coast, exiftool will assume that the time zone is -07:00 unless there is time zone data in the file.

QuoteNow I see that Phil Harvey chimes in recommending that DateFmt() needs to be used (as in the gpx.fmt file) to format as 2019-04-18T18:19:07Z

But what time tag should I apply that to?  DateTimeOriginal?  GeoTime?

No, not in the image, in the GPX file.  The date in your GPX file is
<time>2019:04:18 16:56:07Z</time>
Phil says it needs to be
<time>2019-04-18T16:56:07Z</time>
So you need to recreate your GPX file.  Did you create it using the gpx.fmt file?
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Tempest Character

Hey StarGeek -- I think we are making progress.  I did create the GPX file using the gpx.fmt file (wrong version perhaps?), but I went in by hand to change the colons in the date to dashes and set off the date and time with a "T".  Now I get this:

exiftool -geotag GPX\Vernon.gpx *.jpg
Warning: Time is too far before track in File:Geotime (ValueConvInv) - 00345.jpg
Warning: No writable tags set from 00345.jpg
Warning: Time is too far before track in File:Geotime (ValueConvInv) - 00346.jpg
Warning: No writable tags set from 00346.jpg
Warning: Time is too far before track in File:Geotime (ValueConvInv) - 00347.jpg
Warning: No writable tags set from 00347.jpg
Warning: Time is too far beyond track in File:Geotime (ValueConvInv) - 00348.jpg
Warning: No writable tags set from 00348.jpg
Warning: Time is too far beyond track in File:Geotime (ValueConvInv) - 00349.jpg
Warning: No writable tags set from 00349.jpg
Warning: Time is too far beyond track in File:Geotime (ValueConvInv) - 00350.jpg
Warning: No writable tags set from 00350.jpg...


It would seem that the GPX file is now being read properly, but perhaps the OffsetTimeOriginal should not be "-04:00"?  I get it that here on the west coast I am currently 7 hours behind UTC, and I was thus 4 hours behind it in D.C., but "+4:00", "+7:00" and "-7:00" did not work either (i.e., same complaint as above).  Any clues? 

Thanks.


StarGeek

Quote from: Tempest Character on May 17, 2019, 04:07:13 PM
I did create the GPX file using the gpx.fmt file (wrong version perhaps?),

From your gpx file:
<gpx version="1.0"
creator="ExifTool 10.42"


The DateFmt function used in the gpx.fmt file was was added in 10.49, Apr. 10, 2017.  You're using a two year old version of exiftool.

QuoteIt would seem that the GPX file is now being read properly, but perhaps the OffsetTimeOriginal should not be "-04:00"?

Ah, I think I got it.  Sorry, I don't normally use the geotrack features of exiftool directly and sometimes get things mixed up.

By default, exiftool will use the value of DateTimeOriginal.  By itself, that tag doesn't contain a time zone (that's what OffsetTimeOriginal is for).  So exiftool will assume the local time zone of the computer, in this case, -07:00.

So try this:
exiftool "-Geotime<SubSecDateTimeOriginal" -geotag GPX\Vernon.gpx *.jpg
on any file that you have added the OffsetTimeOriginal tag to
or
exiftool "-Geotime<${DateTimeOriginal}-04:00" -geotag GPX\Vernon.gpx *.jpg
for files that don't have the offset set.

I think that will do it.  Hopefully Phil will chime in if I got something wrong.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Tempest Character

Wow!  That seemed to do the trick -- I threw the geotagged pics into Pic2Map.com to see the scatter of locations around Mt. Vernon and they seem to be approximately in the right spots!   You deduced every problem along the way -- now I have to capture all the learnings here.

Much, much thanks, StarGeek!