Bug 246077 - GPS Coordinates from some images not detected
Summary: GPS Coordinates from some images not detected
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Geolocation-Engine (show other bugs)
Version: 1.3.0
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-28 21:18 UTC by Eric Vaandering
Modified: 2022-01-07 14:00 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 7.5.0


Attachments
Image reproducing the problem (90.67 KB, image/jpeg)
2010-07-29 16:15 UTC, Eric Vaandering
Details
digiKam 2.0.0 screenshot (497.97 KB, image/jpeg)
2010-07-29 16:25 UTC, caulier.gilles
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Vaandering 2010-07-28 21:18:17 UTC
Version:           1.3.0 (using KDE 4.4.3) 
OS:                Linux

I have files with lots of GPS info embedded by GPSCorrelate, but digikam is not picking it up. It picks up the altitude but sets latitude and longitude to 0,0 Here is the info from one of the files:

> exiv2 pr -P X 1280017422.jpg | grep GPS
Xmp.exif.GPSVersionID                        XmpText     7  2.0.0.0
Xmp.exif.GPSLatitude                         XmpText    14  42,20.6371667N
Xmp.exif.GPSLongitude                        XmpText    14  87,46.1826667W
Xmp.exif.GPSAltitudeRef                      XmpText     1  Above sea level
Xmp.exif.GPSAltitude                         XmpText    11  864933/5000
Xmp.exif.GPSTimeStamp                        XmpText    29  2010-07-25T00:23:43.000000000
Xmp.exif.GPSMapDatum                         XmpText     6  WGS-84
> exiv2 pr -P E 1280017422.jpg | grep GPS
Exif.Image.GPSTag                            Long        1  650
Exif.GPSInfo.GPSVersionID                    Byte        4  2.0.0.0
Exif.GPSInfo.GPSLatitudeRef                  Ascii       2  North
Exif.GPSInfo.GPSLatitude                     Rational    3  42deg 20.63720' 
Exif.GPSInfo.GPSLongitudeRef                 Ascii       2  West
Exif.GPSInfo.GPSLongitude                    Rational    3  87deg 46.18270' 
Exif.GPSInfo.GPSAltitudeRef                  Byte        1  Above sea level
Exif.GPSInfo.GPSAltitude                     Rational    1  173.0 m
Exif.GPSInfo.GPSTimeStamp                    Rational    3  00:23:43
Exif.GPSInfo.GPSMapDatum                     Ascii       7  WGS-84
Exif.GPSInfo.GPSDateStamp                    Ascii      11  2010-07-25

Lightroom and Picasa are both fine with this data and show the correct location. I can upload the actual file if that helps.


Reproducible: Always

Steps to Reproduce:
I have the same problem with both 1.2.0 and 1.3.0 on Kubuntu 10.04

Actual Results:  
No GPS Lat/lon are shown. Altitude is shown.

Expected Results:  
All GPS variables should be shown.
Comment 1 caulier.gilles 2010-07-29 09:47:29 UTC
Can you post the image somewhere to test there...

Gilles Caulier
Comment 2 Eric Vaandering 2010-07-29 16:15:10 UTC
Created attachment 49639 [details]
Image reproducing the problem

This is an image showing this issue. I should point out the workflow that produced this starts with a .CR2 file. gpscorrelate is then used to add GPS info to the Lightroom .XMP sidecar file and Lightroom then produces this .JPG. There is clearly GPS info in the .JPG, but digikam only sees the altitude numbers.

> exiv2 pr -P EIX 1279986778-2.jpg | grep -i gps
Exif.Image.GPSTag                            Long        1  678
Exif.GPSInfo.GPSVersionID                    Byte        4  2.0.0.0
Exif.GPSInfo.GPSLatitudeRef                  Ascii       2  North
Exif.GPSInfo.GPSLatitude                     Rational    3  42deg 11.48750' 
Exif.GPSInfo.GPSLongitudeRef                 Ascii       2  West
Exif.GPSInfo.GPSLongitude                    Rational    3  87deg 35.92250' 
Exif.GPSInfo.GPSAltitudeRef                  Byte        1  Above sea level
Exif.GPSInfo.GPSAltitude                     Rational    1  175.6 m
Exif.GPSInfo.GPSTimeStamp                    Rational    3  15:52:58
Exif.GPSInfo.GPSMapDatum                     Ascii       7  WGS-84
Exif.GPSInfo.GPSDateStamp                    Ascii      11  2010-07-24
Xmp.exif.GPSVersionID                        XmpText     7  2.0.0.0
Xmp.exif.GPSLatitude                         XmpText    14  42,11.4875000N
Xmp.exif.GPSLongitude                        XmpText    14  87,35.9225000W
Xmp.exif.GPSAltitudeRef                      XmpText     1  Above sea level
Xmp.exif.GPSAltitude                         XmpText    13  1755885/10000
Xmp.exif.GPSTimeStamp                        XmpText    29  2010-07-24T15:52:58.000000000
Xmp.exif.GPSMapDatum                         XmpText     6  WGS-84
Comment 3 caulier.gilles 2010-07-29 16:25:56 UTC
Created attachment 49640 [details]
digiKam 2.0.0 screenshot

Yes, i can confirm that lat/long info are not decoded fine. Probably it's a problem in libkexiv2... 

Michael ?

Gilles Caulier
Comment 4 Michael G. Hansen 2010-07-30 19:54:58 UTC
I will try to find the problem.

Michael
Comment 5 Marcel Wiesweg 2010-08-04 22:38:28 UTC
0x0004 GPSInfo      GPSLongitude      Rational    3  87/1 359225/10000 0/0

It is encoded in three fractions, for degree, minutes and seconds. You see the mathematical impossibility of 0/0 seconds? It should be 0/1 according to the specs.
(Sigh) We'll handle that case as well.
Comment 6 Eric Vaandering 2010-08-04 22:45:00 UTC
Thanks Marcel. I guess the problem is with Lightroom as the XMP file used as an input shows this:

[ewv@vaandering Lake Michigan]$ grep -i gps 1280017056.xmp
   <exif:GPSVersionID>2.0.0.0</exif:GPSVersionID>
   <exif:GPSLatitude>42,20.6293333N</exif:GPSLatitude>
   <exif:GPSLongitude>87,46.1786667W</exif:GPSLongitude>
   <exif:GPSAltitudeRef>0</exif:GPSAltitudeRef>
   <exif:GPSAltitude>1733395/10000</exif:GPSAltitude>
   <exif:GPSTimeStamp>2010-07-25T00:17:37.000000000</exif:GPSTimeStamp>
   <exif:GPSMapDatum>WGS-84</exif:GPSMapDatum>
Comment 7 Marcel Wiesweg 2010-08-04 22:55:32 UTC
SVN commit 1159244 by mwiesweg:

Be relaxed with seconds of 0/0, obviously produced by lightroom

BUG: 246077


 M  +16 -0     kexiv2gps.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1159244
Comment 8 Marcel Wiesweg 2010-08-04 22:58:05 UTC
XMP stores the coordinates as a string, it does not have the problem. It's also written to GPS, which we read before XMP, there with three rationals.

Photo is now in Lake Michigan again. (libkexiv2 from branch)
Comment 9 Eric Vaandering 2010-08-04 23:08:23 UTC
I filed a bug report with Adobe too. Probably no confirmation, of course.
Comment 10 Marcel Wiesweg 2010-08-17 11:45:42 UTC
I inadvertently reopened the bug last time