Deleting bad GPSLongitudeRef Tag

Started by douggorgen, August 01, 2019, 07:35:32 PM

Previous topic - Next topic

douggorgen

The system gave me a "Page not working" message so I am trying to post again without the attached jpg. Please be kind if this is a duplicate.

The example in the manual for deleting a bad LightSource tag does not appear to work for deleting a bad GPSLongitudeRef tag:


C:\Users\Doug\Desktop>.\exiftool.exe -a -GPSLongitudeRef xxx.jpg
GPS Longitude Ref               : Unknown (36696)
GPS Longitude Ref               : West

C:\Users\Doug\Desktop>.\exiftool.exe -a -GPSLongitudeRef-="Unknown (36696)" xxx.jpg
Warning: [minor] Maker notes could not be parsed - xxx.jpg
Warning: [minor] Entries in GPS were out of sequence. Fixed. - xxx.jpg
Warning: Duplicate GPSLongitudeRef tag in GPS - xxx.jpg
    0 image files updated
    1 image files unchanged

C:\Users\Doug\Desktop>.\exiftool.exe -a -GPSLongitudeRef xxx.jpg
GPS Longitude Ref               : Unknown (36696)
GPS Longitude Ref               : West

C:\Users\Doug\Desktop>.\exiftool.exe -a -GPSLongitudeRef-="Unknown*" xxx.jpg
Warning: [minor] Maker notes could not be parsed - xxx.jpg
Warning: [minor] Entries in GPS were out of sequence. Fixed. - xxx.jpg
Warning: Duplicate GPSLongitudeRef tag in GPS - xxx.jpg
    0 image files updated
    1 image files unchanged

C:\Users\Doug\Desktop>.\exiftool.exe -a -GPSLongitudeRef xxx.jpg
GPS Longitude Ref               : Unknown (36696)
GPS Longitude Ref               : West


I have about 1500 photos, some are West, some East, and some with no GPS data.  I was hoping that a single command parameter like -GPSLongitudeRef-="Unknown*" would work since not all the bad tags have a value of 36696.

If I use the -= by itself, then both the good and the bad tags are deleted.  But then I need to manually add the good tag back in so I need to know whether it was East or West for each photo.  I did this for one photo, and then my Windows 10 apps could display the correct map location. Currently my HTC phone is the only thing that can display the map location.

StarGeek

The fact that there are multiple GPS Longitude Ref combined with the "Entries in GPS were out of sequence" error seems to indicate that the EXIF block might be corrupt.  You might try FAQ #20 to try and repair it but I'd suggest making sure that you have backups of the files you try it on just in case something goes wrong.  But, as the FAQ says, don't use the command on RAW files, only jpgs.
* 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).

douggorgen


Thanks StarGeek, that works like a champ!  I had searched the entire manual for words like "fix" and "fixing" but did not think to search on the word "repair".  It's right there in the manual if you search on "repair".  Thanks again.