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.2113456The 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.2113456For 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