TIKA-4781: Map EXIF GPS altitude to the existing geo:alt property#2941
Open
dschmidt wants to merge 1 commit into
Open
TIKA-4781: Map EXIF GPS altitude to the existing geo:alt property#2941dschmidt wants to merge 1 commit into
dschmidt wants to merge 1 commit into
Conversation
The GeotagHandler mapped latitude, longitude and the GPS timestamp from
the EXIF GpsDirectory, but not the altitude, although tika-core defines
Geographic.ALTITUDE and metadata-extractor exposes the value in the same
directory. Consumers only got the raw description string
("GPS:GPS Altitude" = "227.4 metres").
Set geo:alt as a signed value honoring GPSAltitudeRef (1 = below sea
level = negative), formatted with the same DecimalFormat as latitude
and longitude. Analogous to TIKA-4425, which added the normalized GPS
timestamp from the same directory; see TIKA-2861 for the corresponding
ISO 6709 altitude handling in MP4/QuickTime.
The existing IMG_1034.heic fixture already carries an altitude, so
HeifParserTest now asserts it end to end; handler-level tests cover the
above and below sea level cases.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JIRA: https://issues.apache.org/jira/browse/TIKA-4781
ImageMetadataExtractor'sGeotagHandlermaps latitude, longitude andthe GPS timestamp from the EXIF
GpsDirectory, but not the altitude,although tika-core defines
Geographic.ALTITUDE("geo:alt") andmetadata-extractor exposes the value in the same directory. Consumers
currently only get the raw description string
(
GPS:GPS Altitude = "227.4 metres").This sets
geo:altas a signed value honoringGPSAltitudeRef(1 = below sea level = negative), formatted with the same
DecimalFormatas latitude and longitude.Analogous to TIKA-4425, which added the normalized GPS timestamp from
the same directory; see TIKA-2861 for the corresponding ISO 6709
altitude handling on the MP4/QuickTime side.
Testing: handler-level tests cover the above and below sea level cases;
the existing
IMG_1034.heicfixture already carries an altitude(42.810337 m), so
HeifParserTestnow asserts the mapping end to end.No fixtures added or modified.