D18010: Allow zero altitude/longitude/latitude exiv gps data

Alexander Stippich noreply at phabricator.kde.org
Thu Jan 17 06:54:32 GMT 2019


astippich added inline comments.

INLINE COMMENTS

> bruns wrote in exiv2extractor.cpp:298
> when you rewrite this as
> 
>   if (it != data.end()) {
>       auto ratio = it->value().toRational();
>       it = data.findKey(Exiv2::ExifKey("Exif.GPSInfo.GPSAltitudeRef"));
>       if ((ratio.second != 0) && (it != data.end())) {
>           auto altRef = it->value().toLong();
>           if (altRef) {
>               alt = -1.0 * ratio.first / ratio.second;
>           } else {
>               alt = 1.0 * ratio.first / ratio.second;
>           }
>       }
>   }
> 
> does the unit test pass without special handling of the altitude fuzz?

Yes, it does

REPOSITORY
  R286 KFileMetaData

BRANCH
  fix_zero_gps

REVISION DETAIL
  https://phabricator.kde.org/D18010

To: astippich, bruns
Cc: kde-frameworks-devel, #baloo, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190117/f41aff55/attachment.html>


More information about the Kde-frameworks-devel mailing list