Package com.yahoo.geo

Class DistanceParser

java.lang.Object
com.yahoo.geo.DistanceParser

public class DistanceParser extends Object
Utility for parsing a geographical distance with unit.
  • Field Details

  • Method Details

    • 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".