Highlighted

GPS location imported from iPhone has wrong hemisphere

Explorer ,
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!

 

 

TOPICS
Bug, Mac, Problem or error

Views

276

Likes

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

GPS location imported from iPhone has wrong hemisphere

Explorer ,
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!

 

 

TOPICS
Bug, Mac, Problem or error

Views

277

Likes

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
Jan 01, 2020 0
Explorer ,
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.

Likes

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
Reply
Loading...
Jan 01, 2020 0
Most Valuable Participant ,
Jan 02, 2020

Copy link to clipboard

Copied

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

Likes

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
Reply
Loading...
Jan 02, 2020 0
Most Valuable Participant ,
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.]

Likes

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
Reply
Loading...
Jan 01, 2020 0
Explorer ,
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

 

 

 

 

 

 

 

 

 

 

 

Likes

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
Reply
Loading...
Jan 01, 2020 0
Most Valuable Participant ,
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.

Likes

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
Reply
Loading...
Jan 01, 2020 0
Explorer ,
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.)

Likes

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
Reply
Loading...
Jan 01, 2020 0
Most Valuable Participant ,
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.]

Likes

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
Reply
Loading...
Jan 02, 2020 0
Explorer ,
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.

Likes

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
Reply
Loading...
Jan 02, 2020 0
Most Valuable Participant ,
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.]

Likes

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
Reply
Loading...
Jan 02, 2020 0
Explorer ,
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).

Likes

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
Reply
Loading...
Jan 07, 2020 0
Explorer ,
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.  

 

Likes

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
Reply
Loading...
Jan 08, 2020 0