Package com.yahoo.geo

Class DistanceParser


  • public class DistanceParser
    extends Object
    Utility for parsing a geographical distance with unit.
    • Method Detail

      • getDegrees

        public double getDegrees()
      • parse

        public static double parse​(String distance)
        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".