Lightroom Classic: Losing gps direction (hemisphere) - assumes north and east

  • 1
  • Question
  • Updated 3 months ago
  • Answered
  • (Edited)
I've been finding iPhone photos exported from Photos are being imported in to Lightroom and the GPS coordinates are losing their direction from origin, so photos west of Greenwhich are being plotted to the east instead.  Exiftool shows the GPS coordinates can be detected correctly.

This is in LR Classic 9.2.

Steps to reproduce:
  1. Take a photo with something like my iPhone 8.  It syncs with iCloud
  2. Export via: File menu > Export > "Unmodified Original for 1 One Photo..."
  3. Ensure "Export IPTC as XMP" is checked
  4. Import image in to LR
  5. Examine it in the Map module
Info:

Export options in Photos.app:


How LR shows the coords after import (these are being plotted on the map as E and N, but they should be W and N):


Example of the coords from another photo that is being placed correctly (has N and W info):


GPS info from exiftool for the photo:
$ exiftool IMG_7235.heic | egrep "GPS[[:space:]](L|P)"
GPS Latitude Ref                : North
GPS Longitude Ref               : West
GPS Latitude                    : 51 deg 27' 57.94" N
GPS Longitude                   : 0 deg 17' 15.64" W
GPS Position                    : 51 deg 27' 57.94" N, 0 deg 17' 15.64" W

GPS info from exiftool for the photo's XMP:
$ exiftool IMG_7235.xmp | egrep "GPS[[:space:]](L|P)"
GPS Longitude                   : 0 deg 17' 15.64" E
GPS Latitude                    : 51 deg 27' 57.94" N
GPS Latitude Ref                : North
GPS Longitude Ref               : East
GPS Position                    : 51 deg 27' 57.94" N, 0 deg 17' 15.64" E
Photo of Kath

Kath

  • 10 Posts
  • 1 Reply Like

Posted 3 months ago

  • 1
Photo of John R. Ellis

John R. Ellis, Champion

  • 5123 Posts
  • 1452 Reply Likes
The problem is with Mac Photos 5 -- it's generating invalid XMP. You can see that in the Exiftool output -- the .heic has a longitude of 0 deg 17' 15.64" W, while the .xmp has a longitude of 0 deg 17' 15.64" E.

Here are details I posted in the user-to-user forum (which no longer provides links to individual posts):
The bug is with Mac Photos 5.0, not the iOS camera app. Mac Photos 4.0 generates GPS coordinates in the .xmp sidecar that conform to the industry standard:

<exif:GPSLatitude>37,22.01149980N</exif:GPSLatitude><exif:GPSLongitude>122,15.77629980W</exif:GPSLongitude><br> 

But Mac Photos 5.0 generates GPS coordinates that do not conform:

<exif:GPSLongitudeRef>W</exif:GPSLongitudeRef><exif:GPSLongitude>118.06423907887489</exif:GPSLongitude><exif:GPSLatitudeRef>N</exif:GPSLatitudeRef><exif:GPSLatitude>43.874029118876422</exif:GPSLatitude><br>
 
See here for links to the standard:
https://exiftool.org/TagNames/XMP.html#exif

That same thread has two workarounds: Turn off Export As IPTC As XMP option in Photos, or use Exiftool to correct the .xmp file.

(Edited)
Photo of Kath

Kath

  • 10 Posts
  • 1 Reply Like
Oh, it's right there in my post: the xmp file is showing east when examined with exiftool.  I must have overlooked this because I'd already confirmed that the actual XML says west in the ref element.

I've tried the exiftool command line suggestions in the thread you linked to.  Unfortunately this isn't working for me.  I'm not familiar enough with exiftool, but maybe I can figure out something simple in shell script.

Thanks for the pointers.
(Edited)
Photo of John R. Ellis

John R. Ellis, Champion

  • 5123 Posts
  • 1452 Reply Likes
Sigh, I must have copied the wrong line to the other thread. The correct Exiftool command is:

exiftool \
  '-xmp-exif:gpslongitude<${xmp-exif:gpslongitude#}${xmp-exif:gpslongituderef#}' \
  '-xmp-exif:gpslatitude<${xmp-exif:gpslatitude#}${xmp-exif:gpslatituderef#}' \
  *.xmp
(The #'s tell Exiftool not to do a "print conversion" of the field but rather use the raw character strings stored in the field.)
(Edited)
Photo of Kath

Kath

  • 10 Posts
  • 1 Reply Like
Oh great: that worked!  Thanks so much.