ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: edouardbruelhart on May 22, 2023, 05:23:41 AM

Title: Coordinates unrecognized by certain softwares with EXIF version 0210
Post by: edouardbruelhart on May 22, 2023, 05:23:41 AM
1) system type: Windows 11

2) Exiftool version: 12.62 and older (I made some tests with different versions)

3) specific command line: exiftool -XMP:GPSLongitude="7.2113456" -XMP:GPSLatitude="46.200345645" -GPSLongitudeRef="W" -GPSLatitudeRef="N" ./picture.jpg

4) console output: Warning: [minor] Maker notes could not be parsed - ./picture.jpg
    1 image files updated
5) sample image:picture.jpg

Hi,
 
I want to add coordinates on pictures in order to use the automatic coordinates import on iNaturalist. With EXIF version 0220 it works perfectly, but with EXIF version 0210 I have a minor Warning and the coordinates are no more recognized on iNaturalist. However, the coordinates are added in the metadata. Is there a solution to solve this problem?

Thanks in advance
Title: Re: Coordinates unrecognized by certain softwares with EXIF version 0210
Post by: StarGeek on May 22, 2023, 12:46:48 PM
Quote from: edouardbruelhart on May 22, 2023, 05:23:41 AM3) specific command line: exiftool -XMP:GPSLongitude="7.2113456" -XMP:GPSLatitude="46.200345645" -GPSLongitudeRef="W" -GPSLatitudeRef="N" ./picture.jpg

You are mixing two separate groups.  XMP:GPSLatitude and XMP:GPSLongitude do not have a separate reference direction.  You include the reference directly in the tag.  That part of your command should be
-XMP:GPSLatitude=46.200345645 -XMP:GPSLongitude=-7.2113456

The GPS Ref tags are part of the EXIF group and you would set the EXIF/GPS coordinate tags. The GPS group tags (https://exiftool.org/TagNames/GPS.html) are basically just an alias for EXIF.
-GPSLatitude=46.200345645 -GPSLongitude=7.2113456 -GPSLatitudeRef="N" -GPSLongitudeRef="W"

 By default, exiftool with write to the EXIF GPS tags, unless it's an XMP sidecar file, which would be XMP of course.  But you can prefix these with EXIF: or GPS: if you like.
-EXIF:GPSLatitude=46.200345645 -EXIF:GPSLongitude=7.2113456 -EXIF:GPSLatitudeRef="N" -EXIF:GPSLongitudeRef="W"

Because the EXIF GPS coordinate tags are unsigned, you can set them to the negative value and exiftool will write the correct value.  The same with the reference tags
-GPSLongitude=-7.2113456 -GPSLongitudeRef=-7.2113456

For me, the easiest way to set all at once is to use a wildcard.  This will set all four EXIF GPS tags at the same time.
-GPSLatitude*=46.200345645 -GPSLongitude*=-7.2113456
Title: Re: Coordinates unrecognized by certain softwares with EXIF version 0210
Post by: edouardbruelhart on May 24, 2023, 09:02:48 AM
It worked! Thank you very much