Bug 387000

Summary: GPS Longitude Decimalisation Appears Incorrect In Map
Product: [Applications] digikam Reporter: hardy.public
Component: Geolocation-WorkflowAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: metzpinguin
Priority: NOR    
Version First Reported In: 5.8.0   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In: 5.8.0
Sentry Crash Report:

Description hardy.public 2017-11-16 19:48:01 UTC
I have an image (scanned photo) that in all other programs shows the correct GPS position on a map, but in digiKam it is offset to the East by 1.4km. It's driving me nuts trying to figure out why.

The EXIF longitude is 1°55'39.71"W. This is -1.92750000. However the map view calculates -1.90652 which is approximately 1.42km too far East.

I cannot re-create the problem but I don't want to post the problem image publicly. Please let me know how to PM the image to you if you want to investigate.

Thank you.
Comment 1 Maik Qualmann 2017-11-16 20:39:12 UTC
Send me the image by email.

Maik
Comment 2 Maik Qualmann 2017-11-17 12:50:05 UTC
It comes with the seconds part of the longitude to an incorrect conversion into a rational number by Exiv2. The rational values are completely wrong. Since we need the number as a floating-point number and the toFloat() function returns correct value, this problem can be circumvented in Exiv2.

Maik
Comment 3 Maik Qualmann 2017-11-17 17:50:31 UTC
Git commit bac54a7834064573946a3c380be77b0e3f076e53 by Maik Qualmann.
Committed on 17/11/2017 at 17:49.
Pushed by mqualmann into branch 'master'.

fix possible wrong return value from Exiv2 toRational() function
FIXED-IN: 5.8.0

M  +2    -1    NEWS
M  +32   -57   libs/dmetadata/metaengine_gps.cpp

https://commits.kde.org/digikam/bac54a7834064573946a3c380be77b0e3f076e53
Comment 4 hardy.public 2017-11-17 18:53:51 UTC
Many thanks Maik!
Comment 5 Maik Qualmann 2017-11-17 19:50:55 UTC
Note: re-reading the metadata from images with GPS information must be done.

Maik
Comment 6 hardy.public 2017-12-03 10:25:36 UTC
Thank you very much. Works perfectly in 2-Dec 5.8.0 build.