Bug 157552 - negative altitudes are not shown in metadata GPS sidebar
Summary: negative altitudes are not shown in metadata GPS sidebar
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Gps (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-09 20:43 UTC by Gerhard Kulzer
Modified: 2021-04-08 17:46 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gerhard Kulzer 2008-02-09 20:43:54 UTC
Version:            (using KDE 4.0.0)
Installed from:    Ubuntu Packages
OS:                Linux

When images are geo-tagged with negative altitude values, they are not shown in the digikam right sidebar, the filed is just empty.

Gilles debugged it and found that libkexiv2 and scratchbuf show the negative values, so he infers that the bug is in exiv2 code.
Comment 1 caulier.gilles 2008-02-11 13:33:35 UTC
Andreas,

After to have tested indeep libkexiv2 implementation, the problem sound like internal to Exiv2...

If i use GPS loaction editor (with googlemaps) and if i set manually a negative  altitude, the value is passed properly to Exiv2 via libkexiv2, but storage in metadata is not fine...

Can you reproduce it ?

Gilles Caulier
Comment 2 Andreas Huggel 2008-02-12 08:39:04 UTC
Does libkexiv2 set Exif.GPSInfo.GPSAltitudeRef to 1 in this case? (I
haven't checked any code yet)

From the Exif tag description:

"Exif.GPSInfo.GPSAltitude: Indicates the altitude based on the
reference in GPSAltitudeRef. Altitude is expressed as one RATIONAL
value. The reference unit is meters."

Since the value is stored as an _unsigned_ rational, it can't hold a
negative value.

"Exif.GPSInfo.GPSAltitudeRef: Indicates the altitude used as the
reference altitude. If the reference is sea level and the altitude is
above sea level, 0 is given. If the altitude is below sea level, a
value of 1 is given and the altitude is indicated as an absolute value
in the GSPAltitude tag. The reference unit is meters. Note that this
tag is BYTE type, unlike other reference tags."

Andreas
Comment 3 caulier.gilles 2008-02-12 08:50:32 UTC
Thanks Andreas, 

This is explain why it doesn't work. Look the code here :

http://websvn.kde.org/kde/*checkout*/branches/extragear/kde3/libs/libkexiv2/libkexiv2/kexiv2.cpp?revision=754872&content-type=text%2Fplain&pathrev=754872

... on bool KExiv2::setGPSInfo() method: Exif.GPSInfo.GPSAltitudeRef is always set to 0.

Gilles
Comment 4 caulier.gilles 2008-02-12 09:09:50 UTC
SVN commit 773954 by cgilles:

backport commit #773947 from KDE3 branch
BUG: 157552


 M  +11 -9     kexiv2gps.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=773954
Comment 5 caulier.gilles 2021-04-08 17:46:20 UTC
Not reproducible with digiKam 7.3.0 + Exiv2 0.27.3