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

Wrong GPS in JPEG after Export

New Here ,
Jan 17, 2021 Jan 17, 2021

Copy link to clipboard

Copied

Hi!

 

I noticed an issue with Lightroom Classic CC, version:

Lightroom Classic-Version: 10.1 [ 202012012023-e92d50bb ]
Lizenz: Creative Cloud
Spracheinstellung: de-DE
Betriebssystem: Mac OS 10
Version: 10.15.7 [19H114]

 

Steps:

- Open Canon RAW image (.CR2)

- LR reads GPS data from XMP file

- GPS data and location are correctly shown in LR CC, i.e. location: 49°7'10.9387" N 6°10'34.3276" E

Bildschirmfoto 2021-01-17 um 13.34.17.png

 

- Export to JPEG

- GPS data is shown incorrectly in JPEG EXIF, looks like a rounding error, i.e. 49°0'0" N 6°0'0" E (verified through EXIF Tool and also re-import of the JPEG into LR.

 

Bildschirmfoto 2021-01-17 um 13.33.51.png

 

Is this abug or is there a special setting I need to apply when exporting?

 

Thanks!

t0bY!

 

Views

326

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 17, 2021 Jan 17, 2021

Copy link to clipboard

Copied

I'm unable to reproduce the issue using those coordinates on my LR 10.1.1 / Mac OS 10.15.7.  If you upload the .cr2 and its .xmp sidecar to Dropbox or similar and post the sharing link here, we can see if the problem occurs in other installations and narrow down its cause (and perhaps come up with a workaround or file a bug report).

 

[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 ,
Jan 18, 2021 Jan 18, 2021

Copy link to clipboard

Copied

Thanks John for taking a look into this! Please find an example file plus corresponding XMP here: https://www.dropbox.com/s/r8ax2cfniqo2c14/LR_GPS_bug.zip?dl=0

 

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 18, 2021 Jan 18, 2021

Copy link to clipboard

Copied

I see the same misbehavior with that photo. I'll dig into it over the next day.

 

[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
LEGEND ,
Jan 18, 2021 Jan 18, 2021

Copy link to clipboard

Copied

[This post contains formatting and embedded images that don't appear in email. View the post in your Web browser.]

 

The .xmp file contains coordinates that don't conform to the XMP standard:

 

<exif:GPSLatitude>49.11970520N</exif:GPSLatitude>
<exif:GPSLongitude>6.17620210E</exif:GPSLongitude>

 

Rather, the standard calls for DDD,MM.mmk format:

 

<exif:GPSLatitude>49,7.1823116667N</exif:GPSLatitude>
<exif:GPSLongitude>6,10.5721266667E</exif:GPSLongitude>

 

I don't know why one part of LR (import) accepts the non-standard format, while another (export) chokes on it. 

 

What program or device produced the .xmp?  You should file a bug report with them.  You could file a feature request with Adobe asking them to accept this format, but I think it's very unlikely they'd do it (that's the point of standards, after all).

 

See this document Exif 2.31 metadata for XMP for how GPS coordinates should be represented. In particular, see page 27:

Untitled.png

It's a little wierd that the standard doesn 't allow DD.ddk format, but the CIPA standards have long had a bunch of such oddities.

 

A couple of workarounds:

 

- Select one of the photos and go to the Metadata panel.  Select the GPS field, do cut (Ctrl / Cmd + X), hit enter to save the new empty field, then do paste (Ctrl / Cmd + V), enter. That forces LR to reparse and resave the coordinates.

 

- Before importing photos with those non-standard .xmp sidecars, use the free Exiftool utility to overwrite the GPS fields with themselves.  Exiftool will write the fields in the conforming format.

 

[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 ,
Jan 28, 2021 Jan 28, 2021

Copy link to clipboard

Copied

Sorry for not coming back earlier, I first wanted to understand the issue better.

I generated the XMP files with GraphicConverter v10. After your last post, I contacted the vendor of that software. Their information in short: There are several definitions of the correct format available online. They use Exiftool as their libary to write those files.

My interpretation is, that in the past versions of the metadata definition, maybe the format GraphicConverter writes was valid and got updated in recent versions. Anyway: The vendor implemented the format from the spec you referenced THE SAME DAY and I can confirm that everything now works as expected from their side. Latest version of GraphicConverter 11 has the fix implemented amongst a routine to check and correct older files. Perfect!

 

Now back to Lightroom. In my point of view this is a bug, here is my argument: I imported the files into Lightroom, the coodrinates were displayed correctly. So I went on and imported and edited files. Only after I finished my work, the bug was visible after export. I am now left with 1730 files I spent a lot of time editing. Re-reading metadata is no option for me, since LR would lose all editing steps. Correcting GPS data for each file will take a lot of time.

Thus, could you please support me in raising a bug report with the correct group at Adobe?

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 28, 2021 Jan 28, 2021

Copy link to clipboard

Copied

[This post contains formatting that doesn't appear in email. View the post in your Web browser.]

 

That's excellent that GraphicConverter fixed the bug so quickly -- typical of small companies. 

 

However, I think they're a little confused about the standards -- I checked the 2010 version of the XMP Specification, and it specifies the same format for GPS coordinates.  Also, I checked the version history of Exiftool, and I couldn't find any bug fixes for XMP:GPSLatitude/Longitude. It's possible that GraphicConverter wasn't invoking the Exiftool library quite correctly.

 

Regardless, see here for how to submit bug reports and feature requests here:

https://www.lightroomqueen.com/send-bug-report-feature-request-adobe/

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

 

However, as I mentioned, I'm very skeptical Adobe will change LR to accept the non-standards-conforming GPS coordinates coming from one program. The whole point of standards is that all programs can agree on a single format and don't have to implement multiple, undocumented or poorly documented formats.  

 

It would have been better for LR to have issued a warning or error message when you first tried to import photos with invalid coordinates and refused to have imported those coordinates.  It's a little more likely Adobe might implement that request, though I'm skeptical -- in the past many years, Adobe has put little effort into the non-Develop aspects of LR Classic.

 

Even if Adobe eventually changes LR with respect to this, it usually takes them months or years.  But meanwhile, you need a workaround:

 

1. Make two backups of your LR catalog and make sure you can open them in LR.

 

2. In LR, select all the raw files in your catalog that might have been affected and do Metadata > Save Metadata To File. This updates all the .xmp sidecars to have the latest metadata and Develop settings from the catalog.

 

3. Start Terminal and run this command:

 

exiftool '-xmp:gpslatitude<xmp:gpslatitude' '-xmp:gpslongitude<xmp:gpslongitude' -r -ext xmp dir

 

where dir is the path to the root folder where you store all your photos, e.g. ~/Pictures. The command will rewrite all the coordinates to have the correct format, and it will create backups of all the changed sidecars (with the extension .xmp_original).

 

4. In LR, select the same set of raws from step 2 and do Metadata > Read Metadata From File to read in the changed metadata back into the catalog.

 

I strongly recommend that you test this with a few files in one directory first, then a few more directories, testing the results to make sure it's working as expected.

 

[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
Community Beginner ,
Jun 25, 2023 Jun 25, 2023

Copy link to clipboard

Copied

In case it's of use, I'm seeing GPS locations being altered when exporting a JPEG file, using LR5.7

ExiftoolGUI reports the source JPG has this:

sourceGPS.png

and the exported JPG has this:

exported.png

The exported file's Lat and Long are slightly different.

I can work around that (by just using the file system copy) and of course don't expect an update to LR5.7 anytime soon, but if it would helpful with respect to the current version, I can provide the JPG. If the source file GPS info is malformed, let me know and I will pass that info onto the originator.

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 ,
Jun 25, 2023 Jun 25, 2023

Copy link to clipboard

Copied

I can see if the problem occurs in LR 12.4 and file a bug report if so (there have been some GPS bugs fixed over the years since 5.7).  Upload the file to Dropbox, Google Drive, or similar, and post the sharing link here.

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 ,
Jun 26, 2023 Jun 26, 2023

Copy link to clipboard

Copied

Thank you for your response.  I think I found the problem.  The original image came from an Olympus TG-4 which included GPS data. I think that image was imported to LR, and *then* that TG-4 GPS data was replaced (using GeoSetter, operating directly upon the image in the file system) by more accurate GPS data from a cellphone app.  But apparently when LR does an export, it uses its database metadata (not necessarily what is in the image), and in this case, it still had the original TG-4 GPS data in its database.  Thus the exported file's GPS data did not agree with the image file.  The fix is to tell LR to read the metadata.

 

I didn't test if a 'synchronize folder (scan for metadata updates)' would have also read the metadata.  Of course it would also have worked to do the geotagging *before* the import.

 

This kind of problem can occur because a data item is in two places (in the file and in the LR database) and thus can get out of sync.

 

Thanks again for your interest in the issue.

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 ,
Jun 26, 2023 Jun 26, 2023

Copy link to clipboard

Copied

LATEST

[This post contains formatting and embedded images that don't appear in email. View the post in your Web browser.]


Glad you got it resolved.  Your understanding is correct. For LR, the "truth" is what is in the catalog. If you use an external app to change a photo or its metadata on disk, you'll need to do Metadata > Read Metadata From File to get the newest metadata (and pixels) into the catalog.

 

To find photos whose metadata on disk is newer, you can use the Metadata Status column of the Library Filter bar's Metadata browser:

 

johnrellis_0-1687831484210.png

 

But beware in recent years it has become less reliable, with lots of false positives.

 

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