A zero value was used before to indicate invalid
data, and thus 0° latitude/longitude or 0 m altitude were
not displayed while being valid data. Use NaN to indicate
invalid data. Increase altitude precision by avoiding
intermediate float type
Details
Details
- Reviewers
bruns - Commits
- R286:c3fbdea4f7f3: Fix failing test of exiv gps data
Diff Detail
Diff Detail
- Repository
- R286 KFileMetaData
- Branch
- fix_zero_gps
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 7001 Build 7019: arc lint + arc unit
Comment Actions
Can you create two test files, one with e.g. altitude == 0, and one without altitude?
src/extractors/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? |
src/extractors/exiv2extractor.cpp | ||
---|---|---|
298 | Yes, it does |