Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Big Sur Photos XMP export error in western and southern locations

FYI: I wondered why sometimes exporting .xmp from Photos and copying its metadata to a .jpg put it in a completely wrong location. It seems to be caused by a missing minus (-) sign:


macOS 11 Big Sur Photos.app 6.0 "Export Unmodified Original, Export IPTC as XMP" omits minus (-) sign from western and southern hemisphere coordinates in the exported .xmp.


For example Santiago, Chile (-33.45, -70.666667) is put on the other side of the globe near Islamabad, Pakistan (33.45, 70.666667). The exported .xmp has the following GPS data (the W and S letters are OK but the minus sign is omitted):


<exif:GPSLongitude>70.666667</exif:GPSLongitude>

<exif:GPSLongitudeRef>W</exif:GPSLongitudeRef>


<exif:GPSLatitude>33.45</exif:GPSLatitude>

<exif:GPSLatitudeRef>S</exif:GPSLatitudeRef>


If GPS coordinates are copied from such .xmp, the location is on the other side of the globe. A workaround is to use a text editor to add the minus signs to the .xmp.

Posted on Jan 2, 2021 12:20 PM

Reply

Similar questions

5 replies

Jan 4, 2021 1:09 AM in response to TonyCollinet

The regular export to .jpeg, .tiff and .png seem to handle also western and southern hemispheres OK with this respect.


But if the user wants to losslessly export original image and combine updated metadata from the .xmp, that won't work properly in the west and south. I'll test if there is a workaround in exiftool options for this. GraphicConverter somehow manages copy .xmp sidecar to .jpg so they seem to kinda work although the location tags are not quite correct even there. Fixing .xmp in a text editor is one workaround.


I wonder if this relates to the other reported recent errors in Photos.app location info? Does it affect only western and southern hemispheres?


I sent feedback to Apple but I am not holding my breath. I am still in Mojave, I skipped Catalina and I am testing Big Sur.

Jan 4, 2021 10:23 PM in response to Matti Haveri

It seems the standard way to express latitude and longitude reference is a single character N, S, E, or W although that minus sign also seems to work.


From the EXIF 2.31 metadata for XMP specification:


Value type of GPSCoordinate is a Text value in the form “DDD,MM,SSk” or “DDD,MM.mmk”, where:

• DDD is a number of degrees

• MM is a number of minutes

• SS is a number of seconds

• mm is a fraction of minutes

• k is a single character N, S, E, or W indicating a direction (north, south, east, west)


Leading zeros are not necessary for the for DDD, MM, and SS values. The DDD,MM.mmk form should be used

when any of the native Exif component rational values has a denominator other than 1. There can be any

number of fractional digits.


http://www.cipa.jp/std/documents/e/DC-X010-2017.pdf


So I guess for example these are correct in .xmp:


Degrees, minutes, and seconds (DMS): 41°24'12"S

Degrees and decimal minutes (DMM): 41°24.2028'S


But this is not:


Decimal degrees (DD): 41.40338S


Those GPSLatitudeRef and GPSLongitudeRef lines should not be used.

Jan 6, 2021 8:20 AM in response to Matti Haveri

The GPS in .xmp standard seems to be like this:


<exif:GPSLatitude>36,36.36S</exif:GPSLatitude>

<exif:GPSLongitude>66,54.54W</exif:GPSLongitude>


That current Photos.app 6.0 .xmp flaw can be bypassed:


The metadata from those sidecar .xmp files can be copied to the corresponding .jpg files with GraphicConverter 11.3.3 > File > Browse... > [select folder] > [select .jpg files] > IPTC/XMP menu > XMP Sidecar File > Copy into JPGs, TIFFs, PNGs, webp, HEICs. GraphicConverter 11.3.3 handles this OK although some wrong GPS info is copied to the .jpg.


Correct info can be copied with the following exiftool (*) workarounds:


exiftool -overwrite_original_in_place -ext jpg '-IPTC:CodedCharacterSet=UTF8' -tagsFromFile %d%f.xmp -@ xmp2exif.args '-GPS:GPSLatitudeRef<XMP:GPSLatitudeRef' '-GPS:GPSLongitudeRef<XMP:GPSLongitudeRef' -@ xmp2iptc.args '-XMP-photoshop:DateCreated<XMP-photoshop:DateCreated' '-FileCreateDate<XMP-photoshop:DateCreated' '-FileModifyDate<XMP-photoshop:DateCreated' .


The workaround has the following changes:


'-IPTC:CodedCharacterSet=UTF8' added so High-ASCII umlauts in the IPTC metadata are correctly copied to .jpg files with blank metadata.


'-GPS:GPSLatitudeRef<XMP:GPSLatitudeRef' and '-GPS:GPSLongitudeRef<XMP:GPSLongitudeRef' added so the correct references are copied.


'-all:all' is omitted because it would copy erroneous references to .jpg but '-XMP-photoshop:DateCreated<XMP-photoshop:DateCreated' added because if such .jpg is imported back to Photos.app 6.0, it gets the date from the 'XMP-photoshop:DateCreated' instead 'ExifIFD:DateTimeOriginal'. Isn't it weird that it does not prefer DateTimeOriginal?


If that Photos.app 6.0 .xmp flaw is fixed, the following shorter command should work. Notice that older Photos.app versions export different .xmp and Photos.app 4.0 seems to have 'photoshop:DateCreated' and 'photomechanic:TimeCreated' date and time tags.


exiftool -overwrite_original_in_place -ext jpg -tagsFromFile %d%f.xmp -@ xmp2exif.args -@ xmp2iptc.args '-all:all' '-FileCreateDate<XMP-photoshop:DateCreated' '-FileModifyDate<XMP-photoshop:DateCreated' .


(*) The following pre-built settings files can be used as an aid to copy .xmp tags that Photos.app has updated to the original .jpg files. Notice that by default Safari.app wants to download a .html version so click the .args file you want > "Raw" > File > Save As... > Format: Page Source and strip .txt (or .webarchive that might be suggested) suffix OFF. Or use Firefox, Chrome or other browser to download a text-only version:


xmp2exif.args

xmp2iptc.args


https://github.com/exiftool/exiftool/tree/master/arg_files

Big Sur Photos XMP export error in western and southern locations

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.