Garmin FIT files for Geotagging

Started by KuchKuch, April 16, 2022, 10:13:10 AM

Previous topic - Next topic

StarGeek

I'm not sure what else to say.  Your files work correctly.  My only guess is that you have an older version of exiftool somewhere in your path and that's what is being executed, not the one you think is running.
"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

KuchKuch

I found out what was wrong...

I had been using Windows PowerShell to try and make these changes. As soon as I switched to Command Prompt, it all worked. Thanks StarGeek for all your help and patience.

Now all I need to figure out is what column heading I need to use for GPSImgDirection and what format this needs to be in.


KuchKuch

Also, have another question.

If an image doesn't have GPSDateTime, will ExifTool try and figure this out when you insert ""-Geotime<$DateTimeOriginal+01:00"" from the DateTimeOriginal and insert GPSDateTime depending on what it thinks it is?

StarGeek

Quote from: KuchKuch on April 17, 2022, 03:04:59 PM
I had been using Windows PowerShell to try and make these changes. As soon as I switched to Command Prompt, it all worked. Thanks StarGeek for all your help and patience.

*sigh*  I truly hate Powershell for all the trouble it has caused me while trouble shooting stuff.

QuoteNow all I need to figure out is what column heading I need to use for GPSImgDirection and what format this needs to be in.

You'll have to try something other than CSV, as exiftool won't read GPSImgDirection from a CSV GPS track.  See the link in the post above.  Another supported GPS track such as GPX should work.

Quote from: KuchKuch on April 17, 2022, 03:36:40 PM
If an image doesn't have GPSDateTime, will ExifTool try and figure this out when you insert ""-Geotime<$DateTimeOriginal+01:00"" from the DateTimeOriginal and insert GPSDateTime depending on what it thinks it is?

Yes.  Example output.  The image starts with DateTimeOriginal as the only time tag.  After geotagging the file, the GPS time stamps have been added.
C:\>exiftool -time:all --system:all -G1 -a -s Y:\!temp\ccc\Test4.jpg
[ExifIFD]       DateTimeOriginal                : 2022:04:16 10:09:31

C:\>exiftool -P -overwrite_original -geotag Y:\!temp\ccc\track.csv "-Geotime<$DateTimeOriginal+01:00" Y:\!temp\ccc\Test4.jpg
    1 image files updated

C:\>exiftool -time:all --system:all -G1 -a -s -e Y:\!temp\ccc\Test4.jpg
[ExifIFD]       DateTimeOriginal                : 2022:04:16 10:09:31
[GPS]           GPSTimeStamp                    : 09:09:31
[GPS]           GPSDateStamp                    : 2022:04:16
"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

KuchKuch

#19
Quote from: StarGeek on April 17, 2022, 05:57:40 PM
You'll have to try something other than CSV, as exiftool won't read GPSImgDirection from a CSV GPS track.  See the link in the post above.  Another supported GPS track such as GPX should work.

Which post are you referring to? In any case, I'm not sure if GPSImgDirection can be read by ExifTool from all GPX files. I use to to use Locus Map and I don't believe ExifTool could read the "course" tags in the GPX files made by Locus. See the attached GPX file and please let me know if you have better luck then me.

StarGeek

Quote from: KuchKuch on April 18, 2022, 05:34:44 AM
Which post are you referring to?

At the bottom of this post I link to exiftool's GPS CSV format.

QuoteIn any case, I'm not sure if GPSImgDirection can be read by ExifTool from all GPX files. I use to to use Locus Map and I don't believe ExifTool could read the "course" tags in the GPX files made by Locus. See the attached GPX file and please let me know if you have better luck then me.

I set the GPSDateTime in my test file to 2021:08:24 10:38:00, which is about a minute in to the track.  Here's the commands and output

C:\>exiftool -time:all --system:all -G1 -a -s Y:\!temp\ccc\Test4.jpg
[GPS]           GPSTimeStamp                    : 10:38:00
[GPS]           GPSDateStamp                    : 2021:08:24
[XMP-exif]      GPSDateTime                     : 2021:08:24 10:38:00
[Composite]     GPSDateTime                     : 2021:08:24 10:38:00Z

C:\>exiftool -P -overwrite_original -geotag Y:\!temp\ccc\2021-08-24_10-36-51.gpx "-geotime<GPSDateTime" Y:\!temp\ccc\Test4.jpg
    1 image files updated

C:\>exiftool -G1 -a -s -e --file:all Y:\!temp\ccc\Test4.jpg
[ExifTool]      ExifToolVersion                 : 12.41
[IFD0]          XResolution                     : 72
[IFD0]          YResolution                     : 72
[IFD0]          ResolutionUnit                  : inches
[IFD0]          YCbCrPositioning                : Centered
[GPS]           GPSVersionID                    : 2.3.0.0
[GPS]           GPSLatitudeRef                  : North
[GPS]           GPSLatitude                     : 51 deg 50' 11.53"
[GPS]           GPSLongitudeRef                 : West
[GPS]           GPSLongitude                    : 1 deg 21' 46.65"
[GPS]           GPSAltitudeRef                  : Above Sea Level
[GPS]           GPSAltitude                     : 96.8826087 m
[GPS]           GPSTimeStamp                    : 10:38:00
[GPS]           GPSImgDirectionRef              : True North
[GPS]           GPSImgDirection                 : 173.988785
[GPS]           GPSDateStamp                    : 2021:08:24
[XMP-x]         XMPToolkit                      : Image::ExifTool 12.41
[XMP-exif]      GPSDateTime                     : 2021:08:24 10:38:00


As you can seen near the bottom, GPSImgDirection/GPSImgDirectionRef have been set.
"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

KuchKuch

Thanks StarGeek for looking into that and confirming that GPX file works - Guess I will have to look into what I was doing wrong and why the GPSImgDirection wasn't getting filled when I tried it.