Commit d7a6d41
authored
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.
1 parent 6f2aa85 commit d7a6d41
3 files changed
Lines changed: 38 additions & 2 deletions
File tree
- tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-image-module/src
- main/java/org/apache/tika/parser/image
- test/java/org/apache/tika/parser/image
Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
684 | 684 | | |
685 | 685 | | |
686 | 686 | | |
| 687 | + | |
| 688 | + | |
687 | 689 | | |
688 | 690 | | |
689 | | - | |
690 | | - | |
691 | 691 | | |
692 | 692 | | |
693 | 693 | | |
| |||
697 | 697 | | |
698 | 698 | | |
699 | 699 | | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
700 | 711 | | |
701 | 712 | | |
702 | 713 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| 37 | + | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| |||
85 | 87 | | |
86 | 88 | | |
87 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
88 | 112 | | |
89 | 113 | | |
90 | 114 | | |
| |||
0 commit comments