• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

GPS location imported from iPhone has wrong hemisphere

Explorer ,
Jan 01, 2020 Jan 01, 2020

Copy link to clipboard

Copied

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!

 

 

Views

2.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 01, 2020 Jan 01, 2020

Copy link to clipboard

Copied

SOLVED (I think).

I tried several experiments. (note: The files are in the native .HEIC file format, and the names for experiments 1 and 2 were the default iPhone file names)

(1) I exporting from the Photos App again, imported into Lightroom along with the associated XMP file (which I realize has the full GPS info in much more detail than I was reporting) and replicated the problem: The Map shows the location as China, having dropped the N and W hemisphere identifiers.

(2) I imported into Lightroom, but this time I deleted the XMP file first. The GPS location is correct! It has the N and W identifiers!

(3) I ran the files (both the .HEIC and the .XMP files) through ExifRenamer to change the file names. Now the GPS location is, again, correct! (The .xmp files in approaches 1 and 3 appear to be the same, when I visually inspect them.) 

 

I don't understand the inconsistency in reading GPS hemisphere information, but at least it works some of the time.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 02, 2020 Jan 02, 2020

Copy link to clipboard

Copied

[Post mangled by forum software. See below for repost.]

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 01, 2020 Jan 01, 2020

Copy link to clipboard

Copied

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/10...

 

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.]

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 01, 2020 Jan 01, 2020

Copy link to clipboard

Copied

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.

 

Screen Shot 2020-01-01 at 4.24.44 PM.png

 

 

 

 

 

 

 

 

 

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 01, 2020 Jan 01, 2020

Copy link to clipboard

Copied

"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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 01, 2020 Jan 01, 2020

Copy link to clipboard

Copied

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.)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 02, 2020 Jan 02, 2020

Copy link to clipboard

Copied

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.]

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 02, 2020 Jan 02, 2020

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 02, 2020 Jan 02, 2020

Copy link to clipboard

Copied

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.]

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 07, 2020 Jan 07, 2020

Copy link to clipboard

Copied

Thanks for the helpful pointer! I wanted to be able to write back to say it had all worked, but it didn't....I started trying to figure out why--which got me more confused, and slowed me down.

 

The short answer appears to be: When I run exiftool on the image file (.heic), it gives the correct location. When I run it on the .xmp file that Photos 5.0 produces, it already has appended an (incorrect) "E" to the gpslongitude tag. That's presumably what Lightroom is also reading.

 

More confusingly to me, when I look at the .xmp file in a text editor, it looks different to me from what exiftool shows, in terms of GPS location.

 

My challenge is that I want Lightroom to import the keywords that are embedded in the .xmp file; otherwise, I would just throw away the .xmp file. One possibility would be to figure out how to get exiftool to copy the keywords from the .xmp files directly into the .heic files. Or else, I still need to figure out how to correct what's in the .xmp files. Both of those are beyond my exiftool skills, so advice would be very much appreciated.
 
Two example files are here. In a text editor, the (entire) .xmp file produced by Photos 5.0 looks like this:

 

<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 5.4.0">
   <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
      <rdf:Description rdf:about=""
            xmlns:dc="http://purl.org/dc/elements/1.1/"
            xmlns:exif="http://ns.adobe.com/exif/1.0/"
            xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/">
         <dc:subject>
            <rdf:Seq>
               <rdf:li>Rockefeller Redwoods</rdf:li>
               <rdf:li>Favorites</rdf:li>
               <rdf:li>Redwoods</rdf:li>
            </rdf:Seq>
         </dc:subject>
         <exif:GPSSpeedRef>K</exif:GPSSpeedRef>
         <exif:GPSSpeed>0.023617127910090144</exif:GPSSpeed>
         <exif:GPSTimeStamp>2019-12-30T22:31:15Z</exif:GPSTimeStamp>
         <exif:GPSImgDirection>174.43260959</exif:GPSImgDirection>
         <exif:GPSLongitudeRef>W</exif:GPSLongitudeRef>
         <exif:GPSAltitudeRef>0</exif:GPSAltitudeRef>
         <exif:GPSLongitude>123.94116166999997</exif:GPSLongitude>
         <exif:GPSLatitude>40.341178329999991</exif:GPSLatitude>
         <exif:GPSLatitudeRef>N</exif:GPSLatitudeRef>
         <exif:GPSImgDirectionRef>T</exif:GPSImgDirectionRef>
         <exif:GPSAltitude>51.200000000000003</exif:GPSAltitude>
         <exif:GPSHPositioningError>32.004833106781454</exif:GPSHPositioningError>
         <photoshop:DateCreated>2019-12-30T14:31:15-08:00</photoshop:DateCreated>
      </rdf:Description>
   </rdf:RDF>
</x:xmpmeta>

 

Most notably, neither <exif:GPSLongitude> nor <exif:GPSLatitude> have a direction (N or E/W).

 

In exiftool, the key fields from exiftool *.xmp show (with incorrect East):

 

Subject                         : Favorites, Redwoods
GPS Longitude                   : 123 deg 56' 28.18" E
GPS Latitude                    : 40 deg 20' 28.24" N
GPS Latitude Ref                : North
GPS Longitude Ref               : East

 


In contrast, when I run exiftool *.heic, it shows (correctly)

 

GPS Latitude Ref                : North
GPS Longitude Ref               : West
GPS Latitude                    : 40 deg 20' 28.24" N
GPS Longitude                   : 123 deg 56' 28.18" W

 


So in short, the .heic file is fine. The .xmp file is not.

 

So if possible, how do I get exiftool to add the Subject/keyword fields to the .heic file? Or else, how do I correct the GPS coordinates in the .xmp files? (I have probably 20K of them in all.) I feel like it should be easy, but it's beyond me, so any help would be appreciated. (I can also post this in a exiftool forum if that's the preferred location).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 08, 2020 Jan 08, 2020

Copy link to clipboard

Copied

SOLVED. The following works for me in Mac command line (after installing exiftool) to copy the selected GPS tags from all of the .heic files into their respective .xmp files.

exiftool -tagsfromfile %d%f.heic -gpslongitude -gpslatitude -gpslongituderef -gpslatituderef -r -ext xmp /Users/lancelot/Pictures/Temp

 

As a newbie/ExifToolRefugee, it took me far too long to figure out how to even read the cryptic (to me) exiftool documentation, let alone decypher it and apply it to my example! But exiftool is, indeed, a powerful resource. 

 

My thanks to johnrellis for getting me started.  

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 27, 2022 Jul 27, 2022

Copy link to clipboard

Copied

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 🙂

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 27, 2022 Jul 27, 2022

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 08, 2020 Jan 08, 2020

Copy link to clipboard

Copied

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.]

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 08, 2020 Jan 08, 2020

Copy link to clipboard

Copied

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!

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 08, 2020 Apr 08, 2020

Copy link to clipboard

Copied

Hi johnrellis,

as I faced the same issue exporting my Photos catalog, and found your solution quite elegant. But the line you posted didn't work for me either - did not understand why.

Simple Solution is to keep a space between the '<' operator and the source/target, like:

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

 Then it worked for me, and again many thanks for your approach.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 28, 2020 Feb 28, 2020

Copy link to clipboard

Copied

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. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 01, 2021 Dec 01, 2021

Copy link to clipboard

Copied

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....

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 12, 2020 Apr 12, 2020

Copy link to clipboard

Copied

I corrected (and re-tested) the Exiftool command line in my previous post:

https://community.adobe.com/t5/lightroom-classic/gps-location-imported-from-iphone-has-wrong-hemisph...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 12, 2020 Apr 12, 2020

Copy link to clipboard

Copied

"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.]

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 15, 2020 Nov 15, 2020

Copy link to clipboard

Copied

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!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 10, 2024 Feb 10, 2024

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines