{@code D} The integer part of degrees {@code d} The fractional part of degrees {@code M} The integer part of minutes {@code m} The fractional part of minutes {@code S} The integer part of seconds {@code s} The fractional part of seconds {@code .} The decimal separator
Upper-case letters {@code D}, {@code M} and {@code S} are for the integerparts of degrees, minutes and seconds respectively. They must appear in this order (e.g. "M'D
" is illegal because "M" and "S" are inverted; "D°S
" is illegal too because there is no "M" between "D" and "S"). Lower-case letters {@code d}, {@code m} and {@code s} are for fractional parts of degrees, minutes and secondsrespectively. Only one of those may appears in a pattern, and it must be the last special symbol (e.g. "D.dd°MM'
" is illegal because "d" is followed by "M"; " {@code D.mm}" is illegal because "m" is not the fractional part of "D").
The number of occurrence of {@code D}, {@code M}, {@code S} and theirlower-case counterpart is the number of digits to format. For example, "DD.ddd" will format angle with two digits for the integer part and three digits for the fractional part (e.g. 4.4578 will be formatted as "04.458"). Separator characters like °
, '
and "
and inserted "as-is" in the formatted string (except the decimal separator dot (" {@code .}"), which is replaced by the local-dependent decimal separator). Separator characters may be completely omitted; {@code AngleFormat} willstill differentiate degrees, minutes and seconds fields according the pattern. For example, " {@code 0480439}" with the pattern " {@code DDDMMmm}" will be parsed as 48°04.39'.
The following table gives some examples of legal patterns.
@see Angle @see Latitude @see Longitude @since 2.0 @source $URL$ @version $Id$ @author Martin Desruisseaux (PMO, IRD)
Pattern Example DD°MM'SS"
48°30'00" DD°MM'
48°30' {@code DD.ddd } 48.500 {@code DDMM } 4830 {@code DDMMSS } 483000
|
|
|
|