Bug 193616

Summary: Location not shown digiKam right sidebar after geolocating in external program
Product: [Applications] digikam Reporter: Michał S. <michau>
Component: Database-ScanAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles
Priority: NOR    
Version: 0.10.0   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In: 1.0.0
Sentry Crash Report:

Description Michał S. 2009-05-22 10:18:27 UTC
Version:            (using KDE 4.2.85)
OS:                Linux
Installed from:    SuSE RPMs

In digiKam 0.10.0 (installed from openSUSE KDE4 Factory repository) I noticed strange behaviour: I often use some external programs to geolocate images (i.e. GeoTag, gpscorrelate, manually via exiftool) and after geolocating:

1) geodata of those photographs (coordinates, altitude and date) are NOT SHOWN in Geolocation right sidebar;
2) GPS tags in EXIF are displayed in Metadata right sidebar, so digiKam knows about it;
3) when I'm trying to geolocate those photos in digiKam plugin knows about coordinates and show them;
4) in showFoto location in correctly displayed in right sidebar!

So, it seems that Geolocation (marble) right sidebar in digiKam is the only problem. When I geolocate photos using digiKam plugin, geotags are displayed as it should be.

This is not due to database, because I've geolocated with digiKam running and not running in the background. And EXIF GPS tags are embeded correctly using external programs, this is for sure.
Comment 1 caulier.gilles 2009-05-23 23:38:27 UTC
Sound like GPS info are not updated in database. Marble use these info in digiKam, not exif directly.

Gilles Caulier
Comment 2 Michał S. 2009-05-24 17:14:49 UTC
I don't think it is caused by database, because I have synchronized all metadata of photographs with digiKam's database (using menu Tools -> Synchronize with database, and *also* with button in right sidebar, "Tags" tab) and with no effect.

I've also created new database and with no effect.
Comment 3 caulier.gilles 2009-05-24 17:21:29 UTC
Strange. 

To be sure, if you use sqlitebrowser can you see GPS info in DB for your item ?

Look DB schema for details here :

http://www.digikam.org/docs

Gilles Caulier
Comment 4 Michał S. 2009-05-24 20:25:09 UTC
I've checked with sqlitebrowser in digikam4.db and those photos ID are not present in table ImagePositions (here is GPS info for Marble, isn't it?), but in other tables, such as ImageComments they are present.
Comment 5 caulier.gilles 2009-05-24 20:56:56 UTC
Well, this is the problem. In digiKam we duplicates GPS info in DB to be able to process search. We use these info from DB to pass to marble as well. We don't use Exif info directly.

In Showfoto, it's different. We don't have DB and we use Exif.

The question is : why GPS info are not duplicated to DB with your image ?

Can you attach to this bugzilla file your image to test ?

Gilles Caulier
Comment 6 Michał S. 2009-05-25 20:15:55 UTC
This is one of my RAW (Canon CR2) photos which EXIF GPS tags are not indexed in digiKam's database and not shown in Marble geolocation right sidebar. GPS tags seems to be valid. Here is a link: http://www.nocnyrzepin.net/misc/img_4025.cr2 (I can't add photo as an attachment, because it is too large for bugs.kde).
Comment 7 Michał S. 2009-06-07 15:01:55 UTC
It seems like behaviour I've reported was accidental feature of my installation, because after system install on new machine and building digiKam database for the same photos another time all geolocations are shown correctly in Marble tab.
Comment 8 caulier.gilles 2009-06-07 15:05:29 UTC
So, this issue can be closed ?

Gilles Caulier
Comment 9 Michał S. 2009-06-07 19:02:01 UTC
I think YES.
Comment 10 caulier.gilles 2009-06-07 19:05:12 UTC
Ok thanks

Gilles Caulier
Comment 11 Michał S. 2009-06-18 13:43:33 UTC
I am opening this bug again because I've noticed the same behaviour once again and now I think I know what the problem is:

1) When I download images from my DSLR using digiKam into folder (and they are indexed by digiKam's database I think) and later geolocate them using _external_ program (for example GeoTag) and then reopen digiKam, geolocalizations are not shown for those images in right sidebar, but GPS tags are present and shown in metadata EXIF tab.

2) When I download images to folder when digiKam is not running, geotag them and THEN run digiKam everything is all right, localizations are shown.

So, I think it is a databse 'refresh' feature. However, syncing metadata from those images folder using digikam option or rebuilding whole database give NO RESULT.

I tried it on two different PCs with two different distributions with the same result.
Comment 12 Marcel Wiesweg 2009-07-14 12:27:25 UTC
SVN commit 996417 by mwiesweg:

Prepare to use CollectionScanner/Imagescanner to rescan files ("Read metadata to database")
- so that a manual rescan uses 100% the same code as an initial scan when the
  file is imported
Add a flag to CollectionScanner::scanFile to signal if a normal scan, a scan as if modified
or a full rescan shall be done.
Some internal restructuring.

CCBUG: 193616

 M  +104 -32   collectionscanner.cpp  
 M  +32 -5     collectionscanner.h  
 M  +8 -1      imagescanner.cpp  
 M  +9 -1      imagescanner.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=996417
Comment 13 Marcel Wiesweg 2009-07-16 21:03:25 UTC
SVN commit 997978 by mwiesweg:

Use CollectionScanner/ImageScanner to read metadata from file to database.
This means that this method now uses 100% the same code as if the image
was completely unknown so far and newly added to the collection.

So this method can now be used if
- any metadata was changed by external tools
- a missing piece or bug in our scanning code filled wrong or incomplete info
in the db


 M  +3 -1      NEWS  
 M  +6 -4      libs/imageproperties/imagedescedittab.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=997978