Package org.apache.tika.parser.mp4.boxes
Class ISO6709
java.lang.Object
org.apache.tika.parser.mp4.boxes.ISO6709
Parses ISO 6709 location strings as written in QuickTime/MP4 metadata: the udta
"©xyz" box and the
com.apple.quicktime.location.ISO6709 value. Returns the
latitude, longitude and optional altitude.
Both the decimal-degree form (e.g. +12.3456-098.7654+010.500/) and the ISO 6709
sexagesimal compact forms (±DDMM.MMMM / ±DDMMSS.SSSS for latitude and the
±DDD... equivalents for longitude) are handled. The form is chosen by the
integer-digit count of each angle, which is unambiguous for valid coordinates: a decimal
latitude (|lat| <= 90) has at most 2 integer digits and a decimal longitude
(|lon| <= 180) at most 3, so neither can collide with the 4/6 (latitude) or 5/7
(longitude) integer-digit counts of the minute/second forms. Any other digit count falls
back to a lenient decimal parse.
-
Nested Class Summary
Nested Classes -
Method Summary
-
Method Details
-
parse
- Parameters:
s- an ISO 6709 location string, or null- Returns:
- the parsed location, or null if
sis null or contains no location
-