Unable to write GPSLongitudeRef/GPSLatitudeRef

Started by alexs, February 03, 2020, 07:28:17 AM

Previous topic - Next topic

alexs

I want to set/update GPS tags (namely longitude, latitude and altitude) with exiftool. According to the documentation https://exiftool.org/TagNames/GPS.html it is possible to write positive and negative values to GPSLatitudeRef, GPSLongitudeRef and GPSAltitudeRef tags. In this case exiftool will correctly update both GPSLatitude and GPSLatitudeRef, GPSLongitude and GPSLongitudeRef, GPSAltitude and GPSAltitudeRef, so I won't need to update *Ref tags manually.

But when I try to update ane of these *Ref tags using exiftool command interface (with -stay_open True), I always get error


$ exiftool -stay_open True -@ - -common_args -groupNames --printConv -json
RIMG0046.JPG
-EXIF:GPSLatitudeRef=-35.654
-execute
Warning: String too long for GPS:GPSLatitudeRef
Nothing to do.
{ready}


Interestingly, same values sucessfully written using exiftool application directly with the command

exiftool -EXIF:GPSLatitudeRef=-35.654 RIMG0046.JPG

Am I doing something wrong or this is a bug?

Phil Harvey

Try using a more recent version of ExifTool.  (What version are you using?)

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

Remove the --printconv.  By adding that, you are telling exiftool to directly write "-35.654" to GPSLatitudeRef and not run the routines that will convert it into the N/S reference.
* 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).

alexs

Quote
Try using a more recent version of ExifTool.  (What version are you using?)

Sorry, forgot to mention. I'm using 11.85 on Linux and Windows

Quote
Remove the --printconv.  By adding that, you are telling exiftool to directly write "-35.654" to GPSLatitudeRef and not run the routines that will convert it into the N/S reference.

Thanks, removing --printConv fixes writing. Is it possible to allow print conversion on per-tag basis, similarly to how it can be disabled on a per-tag basis by suffixing the tag name with a #? Looking at the docs seems this is not possible.

Phil Harvey

Ah, thanks StarGeek.  I missed the --printconv

Sorry, there is currently no way to enable print conversion on a single tag once it has been disabled globally.  I had toyed with the idea of having "#" toggle the print conversion, but I didn't do this because I thought it would be too confusing.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

alexs

Quote from: Phil Harvey on February 03, 2020, 12:20:36 PM
Sorry, there is currently no way to enable print conversion on a single tag once it has been disabled globally.  I had toyed with the idea of having "#" toggle the print conversion, but I didn't do this because I thought it would be too confusing.

Thanks for the information. Then I will use a bit more complex approach with writing each tag individually. Thanks again for your help and amazing tool!