The previous code always failed, since the altitude
is given with only a single rational value
below or above sea level.
Details
Details
- Reviewers
bruns - Group Reviewers
Frameworks - Commits
- R286:ca8c11351fe7: fix extraction of GPS altitude for exif data
Diff Detail
Diff Detail
- Repository
- R286 KFileMetaData
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
src/extractors/exiv2extractor.cpp | ||
---|---|---|
285 | According to: the absolute altitude value is a rational, like deg/min/sec. |
src/extractors/exiv2extractor.cpp | ||
---|---|---|
285 | true, but why not use the converted value directly? Otherwise the conversion would have to be made manually by dividing, see fetchGpsDouble() |
src/extractors/exiv2extractor.cpp | ||
---|---|---|
217 | This is bogus, why am I not allowed to take photos at sea level? Or in Greenwhich, at the Equator? Invalid data should not be signaled by 0.0 | |
285 | You are correct, the implicit conversions done by Exiv2 are easy to miss. | |
294 | You could return std::numeric_limits<double>::quiet_NaN() here for the error case. |