It's only after typing all this up and posting that I realized what the actual problem was. And the problem is Windows. Windows doesn't display the reference directions and there isn't anything you can do about that. Even setting with another program such as Adobe Bridge doesn't add the directions.
I'm going to leave all this up, though, so I can point to this post next time someone needs to know about the reference tags.
The EXIF GPS tags are split into two separate tags. One tag holds the actual GPS coordinates and one tag to hold the reference direction, e.g. North/South/East/West/Above/Below. You have to set both tags.
The coordinate tags are unsigned, meaning they
cannot hold a negative value. The associated reference tag is what decides if the coordinates are negative or positive.
The first row of your example csv files needs to have all of these entries, though order doesn't matter except for the SourceFile column, which must be first
SourceFile,GPSLatitudeRef,GPSLatitude,GPSLongitudeRef,GPSLongitude,GPSAltitudeRef,GPSAltitudeWhen writing, exiftool does not required the reference directions to be exactly North/South/East/West/Above/Below. It can accept the raw numbers and will make the necessary conversions. So it is usually easier to just duplicate the actual coordinate tags and add Ref to the end. For example, if you're using a spreadsheet, you could do this
(https://i.imgur.com/1TfZMfI.gif)
Quote from: michaelthebike on June 10, 2022, 06:13:08 AM
Because Windows only accepts Degrees/Minutes/Seconds, it is converted. However the negatives are not retained.
This is only how Windows will accept and display the data, but when using exiftool, it doesn't matter how you enter the data, as per FAQ #14 (https://exiftool.org/faq.html#Q14). This is because no matter how it is entered, by whatever program is used, it is stored in the file in only one way. It is not stored as a set of three numbers (deg/min/sec) nor is it stored as a simple decimal number. It's more complicated than that and I can go into the details if you really want, but it isn't necessary to know in order to write the data.
So, when writing, if you're using a csv file, then it needs to look like the spreadsheet above. If you're writing on the command line, there are multiple ways to write the data.
If you want to be exacting using decimal numbers, you could use
exiftool -GPSLatitudeRef=S -GPSLatitude=1.835 -GPSLongitudeRef=E -GPSLongitude=52.5 -GPSAltitudeRef=Above -GPSAltitude=2.45 file.jpgIf you want to use deg/min/sec, your best off dropping the quotes for minutes and seconds, as it can cause problems on the command line. It's easier to just use the three numbers as per FAQ #14 but you do need quotes around the all three numbers
exiftool -GPSLatitudeRef=South -GPSLatitude="1 50 6.00" -GPSLongitudeRef=East -GPSLongitude="52 30 0.00" -GPSAltitudeRef=Above -GPSAltitude=2.45 file.jpgBut in my opinion, the best way is to use exiftool's wildcard ability when writing.
exiftool -GPSLatitude*=-1.835 -GPSLongitude*=52.5 -GPSAltitude*=2.45 file.jpgor
exiftool -GPSLatitude*="-1 50 6.00" -GPSLongitude*="52 30 0.00" -GPSAltitude*=2.45 file.jpgFull example of commands:
C:\Programs\My_Stuff>exiftool -P -overwrite_original -GPSLatitude*=-1.835 -GPSLongitude*=52.5 -GPSAltitude*=2.45 y:\!temp\Test4.jpg
1 image files updated
C:\Programs\My_Stuff>exiftool -G1 -a -s -e -gpsL* -gpsa* y:\!temp\Test4.jpg
[GPS] GPSLatitudeRef : South
[GPS] GPSLatitude : 0 deg 9' 54.00"
[GPS] GPSLongitudeRef : East
[GPS] GPSLongitude : 52 deg 30' 0.00"
[Composite] GPSLatitude : 0 deg 9' 54.00" S
[Composite] GPSLongitude : 52 deg 30' 0.00" E
[GPS] GPSAltitudeRef : Above Sea Level
[GPS] GPSAltitude : 2.45 m
[Composite] GPSAltitude : 2.4 m Above Sea Level
C:\Programs\My_Stuff>exiftool -P -overwrite_original -all= y:\!temp\Test4.jpg
1 image files updated
C:\Programs\My_Stuff>exiftool -P -overwrite_original -GPSLatitude*="-1 50 6.00" -GPSLongitude*="52 30 0.00" -GPSAltitude*=2.45 y:\!temp\Test4.jpg
1 image files updated
C:\Programs\My_Stuff>exiftool -G1 -a -s -gpsL* -gpsa* y:\!temp\Test4.jpg
[GPS] GPSLatitudeRef : South
[GPS] GPSLatitude : 0 deg 9' 54.00"
[GPS] GPSLongitudeRef : East
[GPS] GPSLongitude : 52 deg 30' 0.00"
[Composite] GPSLatitude : 0 deg 9' 54.00" S
[Composite] GPSLongitude : 52 deg 30' 0.00" E
[GPS] GPSAltitudeRef : Above Sea Level
[GPS] GPSAltitude : 2.45 m
[Composite] GPSAltitude : 2.4 m Above Sea Level
Result in Windows properties
(https://i.imgur.com/krzosyp.png)
And as you pointed out, Windows doesn't display the references direction. There really isn't anything you can do about this, as it's a Windows problem. Even setting with another program such as Adobe Bridge, the results are the same.
Quote from: Phil Harvey on June 10, 2022, 11:04:44 AM
Wow. Great explanation!
And somehow I missed what the actual problem was until I posted it all and actually looked at the Windows properties image I had posted. Still, it'll be a good reference to point to.
Stargeek (and Phil while I'm at it) thanks as ever for the bountiful information and hopefully my description or lack of did not throw you off too much.
Quote from: michaelthebike on June 13, 2022, 09:30:37 AMhopefully my description or lack of did not throw you off too much.
No, it was fine. I was just jumping to conclusions about what the actual question was.