Package com.yahoo.geo
Class DistanceParser
java.lang.Object
com.yahoo.geo.DistanceParser
Utility for parsing a geographical distance with unit.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
static double
Parse a distance in some kind of units, converting to geographical degrees.
-
Field Details
-
m2deg
public static final double m2deg- See Also:
-
km2deg
public static final double km2deg- See Also:
-
mi2deg
public static final double mi2deg- See Also:
-
-
Method Details
-
getDegrees
public double getDegrees() -
parse
Parse a distance in some kind of units, converting to geographical degrees. Note that the number and the unit should be separated by a single space only, or not separated at all. Supported units are "m", "km", "miles", and "deg", the last one meaning degrees with no conversion. For brevity "mi" = "miles" and "d" = "deg".
-