? LatLong

java.lang.Object
mccombe.mapping.LatLong

public class LatLong extends Object
A simple immutable wrapper class for Latitude and Longitude values
  • ?????

    ???
    ???
    ??
    Creates a new instance of LatLong
    LatLong(double lat, double lon)
    Create LatLong instance from specified values of Lat and Lon.
  • ????

    ??????
    ??
    ??
    double
    lat()
    Get the latitude component
    static double
    latDMS(String ns, int deg, int min, double sec)
    A static method to turn values of degrees, minutes and seconds into a latitude value.
    double
    lon()
    Get the longitude component
    static double
    lonDMS(String ew, int deg, int min, double sec)
    A static method to turn values of degrees, minutes and seconds into a longitude value.
    static String
    toDMS(double v, String signs)
     
    Provide a String representing this latitude and longitude.
  • ???????

    • LatLong

      public LatLong()
      Creates a new instance of LatLong
    • LatLong

      public LatLong(double lat, double lon)
      Create LatLong instance from specified values of Lat and Lon.
      ??:
      lat - Latitude (degrees)
      lon - Longitude (degrees)
  • ??????

    • latDMS

      public static double latDMS(String ns, int deg, int min, double sec) throws LatLongFormatException
      A static method to turn values of degrees, minutes and seconds into a latitude value.
      ??:
      ns - "N" or "S". Points south of the equator have negative values of latitude.
      deg - Degrees. Value must not exceed 90.
      min - Minutes - zero or positive, less than 60.
      sec - Seconds - zero or positive real value less than 60.0
      ??:
      value in the range -90.0 to +90.0
      ??:
      LatLongFormatException - if the degrees/minutes/seconds values do not correspond to legal latitudes between 0 and 90.0 or if ns is neither "N" nor "S"
    • lonDMS

      public static double lonDMS(String ew, int deg, int min, double sec) throws LatLongFormatException
      A static method to turn values of degrees, minutes and seconds into a longitude value.
      ??:
      ew - "E" or "W". Points west of the reference meridian have negative values of longitude.
      deg - Degrees. Value must not exceed 180.
      min - Minutes - zero or positive, less than 60.
      sec - Seconds - zero or positive real value less than 60.0
      ??:
      value in the range -180.0 to +180.0
      ??:
      LatLongFormatException - if the degrees/minutes/seconds values do not correspond to legal longitudes between 0 and 180.0 or if ew is neither "E" nor "W"
    • lat

      public double lat()
      Get the latitude component
      ??:
      Latitude (degrees)
    • lon

      public double lon()
      Get the longitude component
      ??:
      Longitude (degrees)
    • toString

      public String toString()
      Provide a String representing this latitude and longitude.
      ??:
      toString ??? Object
      ??:
      The String representation of the coordinates (in Lat/Lon format)
    • toDMS

      public static String toDMS(double v, String signs)