gpslongitude sign is ignored (always defaults to E)

Started by Pereira, January 13, 2021, 08:18:06 AM

Previous topic - Next topic

Pereira

Dear Phil,

I am using exiftool to write GPS coordinates into the image file. It does it well. However, I have to explicitly specify -gpslongituderef=W if longitude is negative. Not too difficult, but I would expect exiftool to take the sign into account and figure that reference itself, or at least issue a warning if it sees the sign. Maybe I am missing some flag that makes it work?
Here is an example:


exiftool a.JPG -overwrite_original_in_place -n -gpslatitude=56 -gpslongitude=-2
exiftool a.JPG -overwrite_original_in_place -n -gpslatitude=56 -gpslongitude=2

both of the commands above would results in the same coordinate written to the image.

Thank you for your help.
Regards
Peter

StarGeek

Exiftool will only set the tags that you tell it to set.  If you don't explicitly set the associated reference tag, it won't be set.

You can work around this by either creating an exiftool shortcut to set both at the same time (see here for an example of how I do it) or you can use a wildcard to set both at the same time e.g. -GPSLatitude*=40.6892 -GPSLongitude*=-74.0445
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Pereira

Nice, thank you! Now I understand what the issue was.

All the best
Peter