Bug 461633 - Using rounded coordinates for map display causes wrong emplacement of picture
Summary: Using rounded coordinates for map display causes wrong emplacement of picture
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Geolocation-Engine (show other bugs)
Version: 7.8.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-09 12:14 UTC by ThierryA
Modified: 2022-11-15 16:56 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 7.9.0
Sentry Crash Report:


Attachments
Screenhot showing the map with the picture in the wrong place (35.00 KB, image/jpeg)
2022-11-09 12:14 UTC, ThierryA
Details
Sample picture (1.80 MB, image/jpeg)
2022-11-09 12:25 UTC, ThierryA
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ThierryA 2022-11-09 12:14:15 UTC
Created attachment 153621 [details]
Screenhot showing the map with the picture in the wrong place

SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. select a picture which has been geolocated with good accuracy (<10 meters)
2. look at the right map tab


OBSERVED RESULT
the picture is placed exactly on grid intersection, coordinates rounded, instead of the real position

EXPECTED RESULT
show the picture in the correct position where it was taken

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

ADDITIONAL INFORMATION
Other software show the picture in the correct location, so I know the picture's coordinates are right
I have seem pictures taken near a border between france and italy and the map shows them in the wrong country !
Example attached (the picture's original location is at cursor position to the north, beyond the border)
Comment 1 Maik Qualmann 2022-11-09 12:20:19 UTC
The coordinates are not rounded. I suspect incorrect coordinates in the XMP metadata area that digiKam reads first. Please upload a sample image if not public to my private mail.
Has the image been processed with DxO?

Maik
Comment 2 ThierryA 2022-11-09 12:25:42 UTC
Created attachment 153623 [details]
Sample picture

Sample picture as requested
Comment 3 ThierryA 2022-11-09 12:26:20 UTC
(In reply to Maik Qualmann from comment #1)
> The coordinates are not rounded. I suspect incorrect coordinates in the XMP
> metadata area that digiKam reads first. Please upload a sample image if not
> public to my private mail.
> Has the image been processed with DxO?
> 
> Maik

Thanks for the QUICK answer !
Yes the image has been processed with DxO
Sample picture added.
Comment 4 Maik Qualmann 2022-11-09 12:35:47 UTC
The image is shown here in the correct position (digiKam-8.0.0 on Windows). Please re-read the metadata from the image, Item Menu-> Re-read metadata from file.

Maik
Comment 5 Maik Qualmann 2022-11-09 12:42:28 UTC
This image produces an error with Exiv2. In digiKam-8.0.0 it is then read with ExifTool, which can be the reason that the position is correct here.

[5692] digikam.metaengine: Exiv2 ( 2 ) :  Directory OlympusCs, entry 0x0101: Strip 0 is outside of the data area; ignored.

Maik
Comment 6 ThierryA 2022-11-09 12:44:27 UTC
(In reply to Maik Qualmann from comment #5)
> This image produces an error with Exiv2. In digiKam-8.0.0 it is then read
> with ExifTool, which can be the reason that the position is correct here.
> 
> [5692] digikam.metaengine: Exiv2 ( 2 ) :  Directory OlympusCs, entry 0x0101:
> Strip 0 is outside of the data area; ignored.
> 
> Maik

I refreshed metadata from files as suggested but no luck.
I'm currently using version 7.8.0 of Digikam, maybe this explains it ?
Maybe I should upgrade ?
Comment 7 caulier.gilles 2022-11-09 12:59:51 UTC
You can try to upgrade to 7.9.0 pre-release, but i doubt that Exiv2 will fix this error.

The windows installer that we provide is compiled with an Exiv2 maintenance branch of source code.

https://files.kde.org/digikam/

Best

Gilles Caulier
Comment 8 ThierryA 2022-11-09 13:02:41 UTC
(In reply to caulier.gilles from comment #7)
> You can try to upgrade to 7.9.0 pre-release, but i doubt that Exiv2 will fix
> this error.
> 
> The windows installer that we provide is compiled with an Exiv2 maintenance
> branch of source code.
> 
> https://files.kde.org/digikam/
> 
> Best
> 
> Gilles Caulier

Thanks for this very quick and effective support !
I upgraded straight to version 8.0.0 (I'm ready to cope with a few rough edges) and re-read the metadata from the files.
The problem disappeared.

We can close the issue for me: problem solved !
Many thanks again.
Comment 9 Maik Qualmann 2022-11-09 18:22:37 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 461522
FIXED-IN: 7.9.0

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

https://invent.kde.org/graphics/digikam/commit/b7d61cad9f0bb72398fb1de405b741d01d050bab
Comment 10 ThierryA 2022-11-10 12:23:05 UTC
(In reply to Maik Qualmann from comment #9)
> 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 461522
> FIXED-IN: 7.9.0
> 
> M  +1    -1    core/libs/metadataengine/engine/metaengine_gps.cpp
> 
> https://invent.kde.org/graphics/digikam/commit/
> b7d61cad9f0bb72398fb1de405b741d01d050bab

Sorry: not fixed in 7.9.0 (tested not working)
but fixed in 8.0.0
Comment 11 Maik Qualmann 2022-11-10 12:29:05 UTC
Yes, that will also be fixed in digiKam-7.9.0. But the current test version available for download does not yet include this latest fix. A little patience until Gilles creates new packages.

Maik
Comment 12 caulier.gilles 2022-11-10 12:32:56 UTC
yes, and a i cannot re-build a Windows target at the moment after an update on my Kubuntu 22.04 system: Qt libraries are not found anymore in MXE env... I investigate actually.
Comment 13 ThierryA 2022-11-10 12:34:28 UTC
(In reply to caulier.gilles from comment #12)
> yes, and a i cannot re-build a Windows target at the moment after an update
> on my Kubuntu 22.04 system: Qt libraries are not found anymore in MXE env...
> I investigate actually.

No impatience here at all.
Thanks for the info and for the work done here.
I'll update when it is available.
Comment 14 caulier.gilles 2022-11-14 08:37:25 UTC
Hi Maik,

I created a new VM with XUbuntu 18.04 without any Qt installed on host, and Qt cross compiled detection work again.

I suspect a mix between files from cmake used to check Qt presence between host and cross compiled env.

It rest few tune to pass the installer compilation. I will fix it this evening.

Gilles
Comment 15 caulier.gilles 2022-11-15 15:45:35 UTC
Hi Thierry,

The new 7.9.0 Windows installer is finally compiled and ready to test, at usual place.

Best

Gilles Caulier
Comment 16 ThierryA 2022-11-15 16:56:17 UTC
And it works very nicely once I have made Digikam re-read the exif from the files.
Many thanks !