Bug 229010 - No support to resync GPS data from digikams database into into jpg files
Summary: No support to resync GPS data from digikams database into into jpg files
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Geolocation-Engine (show other bugs)
Version: 3.5.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-01 11:01 UTC by krienke
Modified: 2020-03-10 13:16 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 7.0.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description krienke 2010-03-01 11:01:14 UTC
Version:           1.1.0 (using KDE 4.3.5)
OS:                Linux
Installed from:    openSUSE RPMs

I created jpg files from my RAW photos using an external program (not digikam). Next using digikam I correlated a GPS track with the jpg files using the correlate KIPI-plugin in digikam. After all I had to manually set GPS position for 10% of the 600 photos I wanted to process. So far everything works fine. 

Then I realized that the jpgs had a compression factor that was to high, so I recreated all the jgs (with the external program) with better quality and copied the new files over the old ones. The effect was of course that all the GPS information stored inside the old jpgs metadata was lost now. However digikam still knew GPS information of each photo from its database and was able to show the location of each photo on the map. 

The problem now was how to write this GPS info from digikams database back into the freshly created jpg files. I tried menu entry "Photo->Write metadata to photo" but this did not add the GPS information to EXIF allthoug I think it should since GPS information is also metadata. 

I did not find any other way to automatically batch write back GPS info stored inside digikams database to the about 600 jpg files.

Thanks
Rainer
Comment 1 caulier.gilles 2013-12-02 23:25:41 UTC
This file still valid using digiKam 3.5.0 ?

Gilles Caulier
Comment 2 krienke 2013-12-03 07:17:20 UTC
Just tested with digikam 3.5.0. This bug report is still valid. GPS information is not rewritten when using "More->Write Metadata to each file" in sidetab "Caption/Tags".
Comment 3 caulier.gilles 2013-12-03 07:29:56 UTC
Ok,  Thanks

And with Maintenance tool ? You can process now a single album to sync metadata with DB. It's the same problem or not ? Just to know if problem is general or only limited to caption and tags sidebar.

Gilles Caulier
Comment 4 krienke 2013-12-03 08:59:52 UTC
The maintenance tool doesn't do the job either. It  writes all sort of other meta data like tags, camera info etc into exif, iptc and xmp but no gps tags like GPSLongitude and  GPSLatitude etc.

Rainer
Comment 5 mau 2016-02-29 08:09:17 UTC
Yesterday I ran into the same problem:
In the past I had geo-located many but not all photos and yesterday I began correcting some wrong geo tags and setting missing ones. For the initial test as well as most images that seemed to work fine, but at some point in time I realized, that there are images where digikam shows the corrected gps data, but the xmp files are not updated correctly. Furthermore there might be a bug that gps data is written into the jpg although I've set it to write to metadata only.

I tried to get the gps data in the sidecar files by both Write Metadata to File and by using the Maintenance Tool, but neither of them worked.

Now I wonder how I can check that all gps tags are written correctly to the xmp's - yesterday I loaded test files into darktable, but that's not perfect and doesn't scale that well... And the fact that gps coordinates can be specified in different formats doesn't help either, converting them isn't that much fun...

Is there a way to force digikam to write the gps data into the xmp files, maybe on the command line? Another idea for a workaround?

Do you need more info or is there another way I can help?

My settings: write all metadata to sidecar files only.
My version: digikam 4.4 on Debian Jessie (4.14 in jessie-backports misses gps support completely, but that's a different problem).
Comment 6 Maik Qualmann 2020-03-09 11:32:34 UTC
*** Bug 418658 has been marked as a duplicate of this bug. ***
Comment 7 Heiner Markert 2020-03-09 11:48:07 UTC
This bug has been reported 10 years ago and is still valid (I also checked against digikam 7.0.0 beta 2, bug is still present). Any chances it will get fixed soon?
Comment 8 Maik Qualmann 2020-03-09 12:09:32 UTC
We currently have no configuration option to enable or disable the writing of GPS data. We could connect it to an existing option e.g. pair with tags when tag writing is enabled. Or create an additional option for GPS. Gilles, what do you think?

The geolocation tool always writes the GPS information into the metadata.

Maik
Comment 9 caulier.gilles 2020-03-09 13:01:10 UTC
Well, i vote for a stand alone option for GPS info, excepted if user feedbacks in bugzilla want another workaround.

Gilles
Comment 10 Heiner Markert 2020-03-09 13:22:31 UTC
I would vote for a separate option as well. Actually, this was the first thing I was looking for after realizing that GPS data is missing in the exported xmp files.
Comment 11 Maik Qualmann 2020-03-09 13:28:52 UTC
Yes, an extra option was my thought.

Maik
Comment 12 Maik Qualmann 2020-03-09 22:04:03 UTC
Git commit 5f58c6e079a730d68e218f0d5b8e384900db9bc0 by Maik Qualmann.
Committed on 09/03/2020 at 22:01.
Pushed by mqualmann into branch 'master'.

add metadata option to write GPS data to the image
Related: bug 418658
FIXED-IN: 7.0.0

M  +3    -1    NEWS
M  +28   -4    core/libs/fileactionmanager/metadatahub.cpp
M  +2    -1    core/libs/fileactionmanager/metadatahub.h
M  +5    -0    core/libs/metadataengine/engine/metaenginesettingscontainer.cpp
M  +1    -0    core/libs/metadataengine/engine/metaenginesettingscontainer.h
M  +11   -1    core/utilities/setup/metadata/setupmetadata.cpp

https://invent.kde.org/kde/digikam/commit/5f58c6e079a730d68e218f0d5b8e384900db9bc0
Comment 13 Heiner Markert 2020-03-10 13:16:08 UTC
Great, thanks for the quick fix. I will evaluate it with 7.0.0beta3 release and give feedback here when I find any issues.