Skip to main content
lancelot21
Participating Frequently
January 1, 2020
Question

GPS location imported from iPhone has wrong hemisphere

  • January 1, 2020
  • 11 replies
  • 6279 views

In LR Classic 9.1, the Map module has the wrong hemisphere (E versus W) for the GPS location. So instead of showing the location as northern California, it shows it in China.

 

I exported iPhone photos from the Photos app on a Mac (export unmodified original; checked Export IPTC as XMP). When I look at the file itself in Preview, it shows the following (correct) coordinates (northern California):

 

Latitude: 40° 26’ 32.508” N
Longitude: 123° 59’ 20.04” W

 

 

I imported the photo into Lightroom, and it shows the following GPS coordinates (China).

 

40°26'32.508" 123°59'20.039"

 

If I manually add N and W to the GPS coordinates, then it shows the correct location.

 

I don't know what to do to correct this before I start editing/modifying thousands of photos!

 

 

11 replies

Participant
February 10, 2024

As of Feb 10th, 2024, the same problem persists. Just don't check the 'Export IPTC as XMP' . The embedded GPS data is fine, the XMP file is defective.

Participating Frequently
May 3, 2024

I've just discovered the same issue. What irks me is that while NeoFinder (a DAM on the Mac) and also ON1 RAW can both read the xmp file correctly Lightroom can't (both Desktop and Classic). The issue has been known for a number of years now and I don't understand why Adobe doesn't show any interest in addressing it. As for a work around, if you wish to keep both the keywords and gps data, and have ON1, before opening the files in LR, open them in ON1 and select 'Embed metadata' under the Photos tab. Once embedded in the file gps info shows correctly in LR along with any keywords. 

johnrellis
Legend
May 3, 2024

It's a bug in Apple Photos (see above). You should complain to Apple. 

Participating Frequently
November 15, 2020

The Apple Photos app has two Export options - one strips off the N W S E from the coordinates, the other options does Not. 

File > Export > Export x Photos...  does NOT strip off the N W S E 

File > Export > Export Unmodified Original for x Photos...   strips off the the directional indicators Do NOT use this export option if you wish to import useful GPS coordinates into Lightroom (or elsewhere).

Cheers!

johnrellis
Legend
April 12, 2020

"If you export originals and turn off the export IPTC as XMP option then the coordinates flow into Lightroom correctly."

 

That only works if the originals contain correct GPS coordinates. If you've added or changed the coordinates within Photos, then you need to turn on the option Export IPTC As XMP to get those coordinates.

 

[Use the blue reply button under the first post to ensure replies sort properly.]

johnrellis
Legend
April 12, 2020
Participant
February 28, 2020

The solution is actually simpler than what you have tried. The problem is the way MacOS Photos creates the XMP file. If you export originals and turn off the export IPTC as XMP option then the coordinates flow into Lightroom correctly. 

Participant
December 2, 2021

Not in case you have thousands of RAW files geotagged in Photos and want to move them to Lightroom... Then your only option is to export originals with XMP....

johnrellis
Legend
January 9, 2020

I'm glad you got a solution. But I'm not sure why my suggested command line didn't work for you -- I tested it on the .xmp files produced by Photos 5.  It takes the E/W stored in the .xmp's exif:GPSLongitudeRef and appends it to the end of the existing exif:GPSLongitude (ditto for exif:GPSLatitudeRef and exif:GPSLatitude). But your solution works too.

 

Exiftool does indeed have a steep learning curve. But it is by far the most authoritative tool for examining and modifying metadata.  I trust it much more than any tool from Adobe, Apple, Google, etc.

 

[Use the reply button under the first post to ensure replies sort properly.]

lancelot21
Participating Frequently
January 9, 2020

I don't know why your command line didn't work for me either. My only conjecture is that exiftool already added an E to the end of gpslongitude when it was missing. So it wouldn't append the correct W. For example, a texteditor shows that temp.xmp file has no direction at the end, just numbers:

 

     <exif:GPSLongitude>123.94116166999997</exif:GPSLongitude>

 

But when I run the following:

exiftool -xmp-exif:gpslongitude test.xmp

What I get back has added an E:

GPS Longitude                   : 123 deg 56' 28.18" E

 

In any case, you have been incredibly generous and helpful, so thank you. I am still a newby, but I've learned a little bit now about what exiftool can do:-) And I wish that Apple would fix its bug!

 

 

johnrellis
Legend
January 2, 2020

You can use the free Exiftool utility to fix the .xmp sidecars generated by Photos 5.0. Use this command line in Terminal:

 

exiftool \
  '-xmp-exif:gpslongitude<${xmp-exif:gpslongitude#}${xmp-exif:gpslongituderef#}' \
  '-xmp-exif:gpslatitude<${xmp-exif:gpslatitude#}${xmp-exif:gpslatituderef#}' \
  *.xmp

 

 

[Corrected to add the #'s, which tells Exiftool to use the raw values stored in the .xmp file.] 

 

[Use the reply button under the first post to ensure replies sort properly.]

Participating Frequently
July 28, 2022

I encountered the same problem, but using your exiftool command fixed most of the images.  I had a few that produced the following error:

Warning: [minor] Tag 'xmp-exif:gpslongitude' not defined - Mexico Trip - 17.xmp
Warning: No writable tags set from Mexico Trip - 17.xmp
Warning: [minor] Tag 'xmp-exif:gpslongitude' not defined - Mexico Trip - 18.xmp
Warning: No writable tags set from Mexico Trip - 18.xmp
Warning: [minor] Tag 'xmp-exif:gpslongitude' not defined - Mexico Trip - 19.xmp
Warning: No writable tags set from Mexico Trip - 19.xmp
Warning: [minor] Tag 'xmp-exif:gpslongitude' not defined - Mexico Trip - 20.xmp
Warning: No writable tags set from Mexico Trip - 20.xmp
Warning: [minor] Tag 'xmp-exif:gpslongitude' not defined - Mexico Trip - 215.xmp
Warning: No writable tags set from Mexico Trip - 215.xmp
Warning: [minor] Tag 'xmp-exif:gpslongitude' not defined - Mexico Trip - 432.xmp
Warning: No writable tags set from Mexico Trip - 432.xmp
Warning: [minor] Tag 'xmp-exif:gpslongitude' not defined - Mexico Trip - 433.xmp
Warning: No writable tags set from Mexico Trip - 433.xmp
Warning: [minor] Tag 'xmp-exif:gpslongitude' not defined - Mexico Trip - 472.xmp
Warning: No writable tags set from Mexico Trip - 472.xmp
Warning: [minor] Tag 'xmp-exif:gpslongitude' not defined - Mexico Trip - 473.xmp
Warning: No writable tags set from Mexico Trip - 473.xmp
  467 image files updated
    9 image files unchanged

 

Any insight? Forgive me as I'm new to exiftool as well 🙂

Participating Frequently
July 28, 2022

Please ignore my question, it turned out that there wasn't any location data associated with the photos that produced the warning 🤷‍♂

johnrellis
Legend
January 2, 2020

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>

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>

See here for links to the standard:

https://exiftool.org/TagNames/XMP.html#exif

 

You could file a feature request in the official Adobe feedback forum to change LR to accommodate the Photos 5.0 bug:

https://feedback.photoshop.com/photoshop_family/categories/photoshop_family_photoshop_lightroom 

 

Product developers read everything posted there, but rarely participate here, which is primarily a user-to-user forum.

 

But in my opinion, that would be a waste of time, since I think it's highly unlikely Adobe would change LR to accommodate a simple Apple software bug in an Apple feature that's infrequently used.  It might be more productive to ask Adobe to ask Apple to fix the bug (since Adobe is likely to have much more sway with Apple than a mere consumer).

 

[Use the reply button under the first post to ensure replies sort properly.]

lancelot21
Participating Frequently
January 2, 2020

Thanks so much--this is very helpful for a relative newbie like me. I feel like I've been wrestling with Photos and Lightroom for longer than I wanted, and a little advice goes a long way to helping me find a workflow that gets me where I am trying to go.

johnrellis
Legend
January 2, 2020

"sometimes Lightroom gets it right, sometimes it doesn't"

 

If you want to understand why, upload two sample photos along with their .xmp sidecars (one that works with LR, one that doesn't) to Dropbox or similar and post the sharing link here. Perhaps the Photos bug is intermittent, or perhaps something else is going on.

lancelot21
Participating Frequently
January 2, 2020

I think I figured it what's going on.

 

I have been exporting unmodified originals with the associated XMP file that contains the GPS info (in Apple's format, not the conventions) as well as keywords. When the XMP file is there, Lightroom gets the file keywords from the Photos app but gets the GPS location wrong.  In contrast, when the XMP file is NOT there, the GPS info is embedded in the exported Photos app picture, and Lightroom reads that info correctly. However, the keywords were in the XPM file, not in the photo, so without the XMP file, the keywords don't carry over. 

 

(We can debate whose fault the GPS problems are. But the more relevant thing is that iPhones are more important to Adobe/Lightroom than Lightroom is to Apple. So Lightroom really should adjust.)

johnrellis
Legend
January 1, 2020

Mac Photos is generating incorrect XMP GPS metadata that doesn't conform to industry standards.  See this thread for additional details:

https://community.adobe.com/t5/lightroom-classic/exif-gps-data-gpslongituderef-gpslatituderef/m-p/10672337#M159671

 

You could try reporting this bug to Apple, but good luck with that -- Apple's about as responsive as Adobe.

 

[Use the reply button under the first post to ensure replies sort properly.]

lancelot21
Participating Frequently
January 2, 2020

Thanks. What surprises me is the inconsistency of it--sometimes Lightroom gets it right, sometimes it doesn't (so sometimes it figures out Apple's non-conforming XMP).  Even when it does, the Map view always has a label in the upper right that says "China" (see pic). I don't know where that comes from--I don't have any metadata presets on import.