KML or GPX sync with pictures MacOS

Started by zierbeek, April 26, 2021, 04:00:27 AM

Previous topic - Next topic

zierbeek

Thanks!

So no adjustment.  Some pictures between others do not get a geotag assigned. is this expected. They fall in between images on the same day and about the same timestamp which get a geotag assigned.

Phil Harvey

Try geotagging these images again, but use the -v option.  This should tell you what the problem is.  My guess is the fixes in the GPS track are too far apart, but this can be fixed by adjusting the GeoMaxIntSecs and GeoMaxExtSecs API parameters.  Something like this:

exiftool -api geomaxintsecs=7200 ...

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

zierbeek

Thanks Phil, will try that. Now i edited them manually in Digikam, not that big of a pain in the ass :p

zierbeek

Hmm
is there a syntax error in this? I navigated to the folder where my pictures are and also put a logs folder in there with the KML's

exiftool -api geomaxintsecs=15000 -geotag /Volumes/tank1/Photoprism/Photos/2019/07/logs/* /Volumes/tank1/Photoprism/Photos/2019/07/*

I get the error that it's to far beyond. Should i increase the geomaxint?

StarGeek

Quote from: zierbeek on August 21, 2021, 05:09:37 AM
I get the error that it's to far beyond. Should i increase the geomaxint?

Try adding the -v2 (-verbose) option as described in Troubleshooting Geotagging #3.  The output will show you what time range the geotrack is using and what time is being used for the image.  In most cases you would just add the geosync option to shift the timing to match.

For example, normally I'm West coast US, -07:00 time zone currently.  But if I took a trip to New York, East coast US, -04:00, took pictures and geotrack, and tried to geotag when I got home, exiftool would be applying my local time zone of -07:00 by default and the files would be off.

So, in this example, it shows that the GPS track is at noon UTC, but the time set for the file is 15:00:00 UTC.  If I set -geosync to subtract 3 hours, (my -07:00 timezone minus the locations -04:00 timezone, e.g. -07:00-(-04:00)=-03:00) the command works.
C:\>exiftool -P -overwrite_original -geotag out.gpx y:\!temp\Test4.jpg  -v2
Argument "-Geotime<DateTimeOriginal#" is assumed
Loaded 1 points from XML-format GPS track log file 'out.gpx'
  GPS track start: 2021:08:21 12:00:00.000 UTC
  GPS track end:   2021:08:21 12:00:00.000 UTC
Writing File:Geotag
======== y:/!temp/Test4.jpg
Setting new values from y:/!temp/Test4.jpg
  Geotime value:   2021:08:21 15:00:00.000 UTC (local timezone is -07:00)
Warning: Time is too far beyond track in File:Geotime (ValueConvInv) - y:/!temp/Test4.jpg
Warning: No writable tags set from y:/!temp/Test4.jpg
Nothing changed in y:/!temp/Test4.jpg
    0 image files updated
    1 image files unchanged

C:\>exiftool -P -overwrite_original -geosync=-3:0:0 -geotag out.gpx y:\!temp\Test4.jpg 
    1 image files updated

"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

zierbeek

I thought I would succeed this time but unfortunately not...

I went on a trip to Romania which is a one hour difference with my country. Belgium is UTC+2 and Romania UTC+3. The camera was set to Belgium. The kml I have is on UTC+2. I thought it should work this way:

exiftool -GeoSync=-01:00 -geotag *.kml /Users/matthias/Desktop/Roemenië\ 2021/


but no luck:
Warning: Time is too far beyond track in File:Geotime (ValueConvInv) - /Users/matthias/Desktop/Roemenië 2021/DSCF7481.JPG
Warning: No writable tags set from /Users/matthias/Desktop/Roemenië 2021/DSCF7481.JPG


The kml was taken with google timeline and 4g was enabled all the time to improve accuracy

StarGeek

You need to geosync from the camera time, which you say is +02:00, to UTC.  So it should be -02:00.

As I said, add -v2 to the command and exiftool will tell you what time it is actually using and make adjustments based upon that.
"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

zierbeek

Around 250 images get edited, 2300 don't get tagged.

Setting new values from /Users/matthias/Desktop/Roemenië 2021/DSCF7827.RAF
  Geotime value:   2021:09:13 11:11:59.000 UTC (incl. Geosync offset of -7200.000 sec) (local timezone is +04:00)
Warning: Time is too far beyond track in File:Geotime (ValueConvInv) - /Users/matthias/Desktop/Roemenië 2021/DSCF7827.RAF
Warning: No writable tags set from /Users/matthias/Desktop/Roemenië 2021/DSCF7827.RAF
Nothing changed in /Users/matthias/Desktop/Roemenië 2021/DSCF7827.RAF

StarGeek

So the file DSCF7827.RAF using a time of "2021:09:13 11:11:59.000 UTC", adjusted by your computer's local timezone of +04:00.  Take a look at what DateTimeOriginal is set to in the file and figure out what time you need to set it to to be part of the geotrack and GeoSync based upon the difference.
"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

zierbeek

thanks again for your help.

It seemed that it was a syntax error!

works:
exiftool -v2 -GeoSync=-02:00:00 -geotag "*.kml" /Users/matthias/Desktop/Roemenië\ 2021/*

doesn't work:
exiftool -v2 -GeoSync=-02:00:00 -geotag *.kml /Users/matthias/Desktop/Roemenië\ 2021/*

Phil Harvey

Yes.  MacOS and Linux will expand *.kml on the command line unless you put it in quotes, and the -geotag option requires a single argument so expanding into multiple file names doesn't work.

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