Bug 461522

Summary: Geo Localisation differs between two jpg-Files
Product: [Applications] digikam Reporter: Michael Hähnel <m.haehnel>
Component: Geolocation-EngineAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: metzpinguin
Priority: NOR    
Version First Reported In: 7.8.0   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In: 7.9.0
Sentry Crash Report:

Description Michael Hähnel 2022-11-06 21:34:01 UTC
SUMMARY

GPS position for RAW file or jpg-out-of-cam is different from processed jpg from RAW file.
Detail: I shoot with Olympus OM-D EM-5 in raw format (and jpg), process the raw file in DxO with output to jpg. If I select raw and processed jpg DigiKam geo localisation windows displays differen coordinates hence different postion on map.

If I display both files (raw and processed jpg) in Windows Photo app or with app GPSprune, the GPS coordinates and displayed position values are identically. I compared the read out of GPS values with exiftool.exe: identic values for all files.
As other programs display the correct position, I assume the problem is within DigiKam. If you need example files please let me know how to submit as I can not attach to this ticket (file size exceeds limit)

Coordinate readings from Digikam:
from raw orf: geo:52.4689466667,12.8763633336,0
from jpg ooc: geo:52.4689466667,12.8763633336,0
from jpg dxo: geo:52.4666666667,12.8666666667   <=== wrong values

Coordinate readings from exiftools (same with other programs)
for all files:
GPSLatitude                     : 52.4689466666667
GPSLongitude                    : 12.8763633333333

For Nikon files processed with DxO there is no problem. Don't know of other cameras.

STEPS TO REPRODUCE
1. check attached example files
2. select from digikam and open geo localisation window
3. you find .orf at correct position but .jpg at different position.

OBSERVED RESULT
differend GPS position in value column and different position on map.

EXPECTED RESULT
should be same values/position for all files

SOFTWARE/OS VERSIONS
Windows: 10 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Maik Qualmann 2022-11-06 21:37:51 UTC
The problem has already been reported, DXO saves wrong coordinates in XMP. digiKam reads XMP first for various reasons.

Maik
Comment 2 Maik Qualmann 2022-11-06 21:43:18 UTC

*** This bug has been marked as a duplicate of bug 458754 ***
Comment 3 Michael Hähnel 2022-11-07 20:59:22 UTC
Actually I can not see any differences between exif and XMP read out with help of exiftool:

...>exiftool -GPSLatitude -GPSLongitude -GPShight -n example*
======== example-out-of-camera.JPG
GPS Latitude                    : 52.4689466666667
GPS Longitude                   : 12.8763633333333
======== example-processed-with-DxO.jpg
GPS Latitude                    : 52.4689466666667
GPS Longitude                   : 12.8763633333333
======== example.ORF
GPS Latitude                    : 52.4689466666667
GPS Longitude                   : 12.8763633333333
    3 image files read

...>exiftool -XMP:GPSLatitude -XMP:GPSLongitude -XMP:GPShight -n exampl*
======== example-out-of-camera.JPG
======== example-processed-with-DxO.jpg
GPS Latitude                    : 52.4689466666667
GPS Longitude                   : 12.8763633333333
======== example.ORF
    3 image files read
Comment 4 Michael Hähnel 2022-11-07 21:02:28 UTC
If the root cause of the problem is within DxO software, I open up a ticket there. But for now I can not tell a problem caused by DxO.
Comment 5 Maik Qualmann 2022-11-07 21:04:31 UTC
Geolocation information can be found in EXIF and/or XMP metadata. See the other bug report, there was mismatched geolocation metadata in XMP in an image processed by DxO. Send me your image from DxO and I'll check it, to my email.

Maik
Comment 6 Maik Qualmann 2022-11-09 18:22:45 UTC
Git commit b7d61cad9f0bb72398fb1de405b741d01d050bab by Maik Qualmann.
Committed on 09/11/2022 at 18:20.
Pushed by mqualmann into branch 'qt5-maintenance'.

fix get geolocation coordinates from XMP string
Related: bug 458754, bug 461633
FIXED-IN: 7.9.0

M  +1    -1    core/libs/metadataengine/engine/metaengine_gps.cpp

https://invent.kde.org/graphics/digikam/commit/b7d61cad9f0bb72398fb1de405b741d01d050bab