Main Menu

Geotag

Started by KipperOccy, September 07, 2022, 09:35:42 PM

Previous topic - Next topic

KipperOccy

Hello, having a lot of joy using this awesome application - Thanks
I was wondering if anyone could help me with this (hopefully) simple problem.
I am trying to geotag a folder of images from GPX/kml/CSV. Whichever I use I get the same errors, which makes me think it must be the formatting of the file I'm using but have tried figuring out for a couple of days now:

command I'm using:
exiftool -geotag=UTCSonar_2022-08-31_12.20.29.csv "Folder Address"

Error message:
>exiftool -geotag=UTCSonar_2022-08-31_12.20.29.csv "Folder Address"
Warning: No track points found in GPS file 'UTCSonar_2022-08-31_12.20.29.csv' in File:Geotag (ValueConvInv)
Warning: [minor] Unrecognized MakerNotes - Folder Address/G0015186.JPG
Warning: No writable tags set from Folder Address/G0015186.JPG

Sample images and CSV/GPX attached..
Windows 10, exiftool version 12.4.4.0

StarGeek

The reason the GPX file doesn't work is because there isn't any timing data in the file, just coordinates.  Exiftool needs to know the time at each coordinate in the track to interpenetrate the location where the time in the image should be located.

The problem with the CSV file is the time format.  At first I thought it might be the date formatted as 2022-08-01 when the ExifTool CSV Log File Format says it should be in EXIF format, which would be colons, e.g. 2022:08:01.  But it turns out it's just the "T" in the middle.  Remove that and exiftool will be able to load the track.

That leads to the second problem, which is adjusting the time, which may not be a problem for you depending upon your time zone.  The time in the GPS track is supposed to be UTC, while the time in the images is supposed to be local time where the image was shot.

Run your command with the -v2 (-verbose2) option.  You will get some output like this
Argument "-Geotime<DateTimeOriginal#" is assumed
Loaded 2340 points from CSV-format GPS track log file 'Y:\!temp\ccc\f\UTCSonar_2022-08-31_12.20.29.csv'
  GPS track start: 2022:08:31 02:20:32.234 UTC
  GPS track end:   2022:08:31 03:04:29.580 UTC
Writing File:Geotag
======== Y:/!temp/ccc/f/G0015180.JPG
Setting new values from Y:/!temp/ccc/f/G0015180.JPG
  Geotime value:   2022:08:31 22:00:39.000 UTC (local timezone is -07:00)

Here, exiftool has to assume my local time zone for the file, which ends up as a geotime value of UTC 2022:08:31 22:00:39 for the file, 20 hours ahead of geotrack start time of 2022:08:31 02:20:32.  So I have to apply a shift of about -20 hours to the time stamp.

There are several ways to do this.  In the above output, it shows you what exiftool is using as the time.  You can add that option to the command but include the time zone.  Shifting 20 hours from my -07:00 time zone gives a +13:00 time zone
exiftool "-Geotime<$DateTimeOriginal#+13:00" -geotag UTCSonar_2022-08-31_12.20.29.csv /path/to/files/

You could add the time zone to all the files with
exiftool -OffsetTime*=+13:00 /path/to/files/
And then use
exiftool "-Geotime<SubSecDateTimeOriginal#" -geotag UTCSonar_2022-08-31_12.20.29.csv /path/to/files/
This has the advantage of making the time zone available for future operations.  This is pretty much what I do with my files.

The last option would be to use Geosync to shift the time.  This is normally used for minor shifts where the timing might be off by a few minutes.
exiftool -geosync=-20:0:0 -geotag UTCSonar_2022-08-31_12.20.29.csv /path/to/files/
I would not recommend this option in this case, but it will get the job done.
"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

KipperOccy

Thanks so much for your help.
Final outcome was successful. There was some swearing at Excel which kept doing funky stuff with the date formatting.

This info might be useful for anyone else having problems:
In the end I exported the csv straight to google drive and opened it in google sheets where I edited the headings to suit the exiftool format, then re-downloaded to the working directory.  I didn't open it with Excel at all. Interestingly, when opening it in google sheets there was no 'T' in the DateTime column
GPSLatitude   GPSLongitude   GPSAltittude   GPSDateTime          
-36.61330166   175.7856769   1.97           2022-08-31 02:20:32
DateTime for the track was already in UTC and photos were in local time

Everything has written to the photos in my test file - my next step is to try to import them into QGis..

Thanks again - amazing support!