Class LatLonPointImpl

java.lang.Object
ucar.unidata.geoloc.LatLonPointImpl
All Implemented Interfaces:
Serializable, LatLonPoint
Direct Known Subclasses:
LatLonPointImmutable

@Deprecated public class LatLonPointImpl extends Object implements LatLonPoint, Serializable
Deprecated.
only use LatLonPoint in 6.
Standard implementation of LatLonPoint. Longitude is always between -180 and +180 deg. Latitude is always between -90 and +90 deg.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated.
    use LatLonPoint.create
    LatLonPointImpl(double lat, double lon)
    Deprecated.
    use LatLonPoint.create
    Deprecated.
    use LatLonPoint.create
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    betweenLon(double lon, double lonBeg, double lonEnd)
    Deprecated.
    use LatLonPoints.betweenLon
    boolean
    equals(Object other)
    Deprecated.
     
    static double
    getClockwiseDistanceTo(double from, double to)
    Deprecated.
    use LatLonPoints.getClockwiseDistanceTo
    double
    Deprecated.
    Returns the latitude, in degrees.
    double
    Deprecated.
    Returns the longitude, in degrees.
    int
    Deprecated.
     
    static double
    latNormal(double lat)
    Deprecated.
    use LatLonPoints.latNormal
    static String
    latToString(double lat, int ndec)
    Deprecated.
    use LatLonPoints.latToString
    static double
    lonDiff(double lon1, double lon2)
    Deprecated.
    use LatLonPoints.lonDiff
    static double
    lonNormal(double lon)
    Deprecated.
    use LatLonPoints.lonNormal
    static double
    lonNormal(double lon, double center)
    Deprecated.
    use LatLonPoints.lonNormal
    static double
    lonNormal360(double lon)
    Deprecated.
    use LatLonPoints.lonNormal360
    static double
    lonNormalFrom(double lon, double start)
    Deprecated.
    use LatLonPoints.lonNormalFrom
    static String
    lonToString(double lon, int ndec)
    Deprecated.
    use LatLonPoints.lonToString
    boolean
    nearlyEquals(LatLonPoint that, double maxRelDiff)
    Deprecated.
    Returns true if this point is nearly equal to that.
    static double
    range180(double lon)
    Deprecated.
    use LatLonPoints.range180
    void
    set(double lat, double lon)
    Deprecated.
    set lat, lon using double values
    void
    set(float lat, float lon)
    Deprecated.
    set lat, lon using float values
    void
    Deprecated.
    set lat, lon using values of pt
    void
    setLatitude(double lat)
    Deprecated.
    Set the latitude, in degrees.
    void
    setLongitude(double lon)
    Deprecated.
    Set the longitude, in degrees.
    Deprecated.
    Default string representation
    toString(int sigDigits)
    Deprecated.
    use LatLonPoints.toString

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface ucar.unidata.geoloc.LatLonPoint

    nearlyEquals
  • Constructor Details

    • LatLonPointImpl

      @Deprecated public LatLonPointImpl()
      Deprecated.
      use LatLonPoint.create
    • LatLonPointImpl

      @Deprecated public LatLonPointImpl(LatLonPoint pt)
      Deprecated.
      use LatLonPoint.create
      Copy Constructor.
    • LatLonPointImpl

      @Deprecated public LatLonPointImpl(double lat, double lon)
      Deprecated.
      use LatLonPoint.create
      Creates a LatLonPoint from component latitude and longitude values. The longitude is adjusted to be in the range [-180.,180.].
      Parameters:
      lat - north latitude in degrees
      lon - east longitude in degrees
  • Method Details

    • betweenLon

      @Deprecated public static boolean betweenLon(double lon, double lonBeg, double lonEnd)
      Deprecated.
      use LatLonPoints.betweenLon
      Test if point lies between two longitudes, deal with wrapping.
      Parameters:
      lon - point to test
      lonBeg - beginning longitude
      lonEnd - ending longitude
      Returns:
      true if lon is between lonBeg and lonEnd.
    • getClockwiseDistanceTo

      @Deprecated public static double getClockwiseDistanceTo(double from, double to)
      Deprecated.
      use LatLonPoints.getClockwiseDistanceTo
    • range180

      @Deprecated public static double range180(double lon)
      Deprecated.
      use LatLonPoints.range180
      put longitude into the range [-180, 180] deg
      Parameters:
      lon - lon to normalize
      Returns:
      longitude in range [-180, 180] deg
    • lonNormal360

      @Deprecated public static double lonNormal360(double lon)
      Deprecated.
      use LatLonPoints.lonNormal360
      put longitude into the range [0, 360] deg
      Parameters:
      lon - lon to normalize
      Returns:
      longitude into the range [0, 360] deg
    • lonNormal

      @Deprecated public static double lonNormal(double lon, double center)
      Deprecated.
      use LatLonPoints.lonNormal
      put longitude into the range [center +/- 180] deg
      Parameters:
      lon - lon to normalize
      center - center point
      Returns:
      longitude into the range [center +/- 180] deg
    • lonNormalFrom

      @Deprecated public static double lonNormalFrom(double lon, double start)
      Deprecated.
      use LatLonPoints.lonNormalFrom
      put longitude into the range [start, start+360] deg
      Parameters:
      lon - lon to normalize
      start - starting point
      Returns:
      longitude into the [start, start+360] deg
    • lonNormal

      @Deprecated public static double lonNormal(double lon)
      Deprecated.
      use LatLonPoints.lonNormal
      Normalize the longitude to lie between +/-180
      Parameters:
      lon - east latitude in degrees
      Returns:
      normalized lon
    • lonDiff

      @Deprecated public static double lonDiff(double lon1, double lon2)
      Deprecated.
      use LatLonPoints.lonDiff
      Find difference (lon1 - lon2) normalized so that maximum value is += 180.
      Parameters:
      lon1 - start
      lon2 - end
      Returns:
      normalized difference
    • latNormal

      @Deprecated public static double latNormal(double lat)
      Deprecated.
      use LatLonPoints.latNormal
      Normalize the latitude to lie between +/-90
      Parameters:
      lat - north latitude in degrees
      Returns:
      normalized lat
    • latToString

      @Deprecated public static String latToString(double lat, int ndec)
      Deprecated.
      use LatLonPoints.latToString
      Make a nicely formatted representation of a latitude, eg 40.34N or 12.9S.
      Parameters:
      lat - the latitude.
      ndec - number of digits to right of decimal point
      Returns:
      String representation.
    • lonToString

      @Deprecated public static String lonToString(double lon, int ndec)
      Deprecated.
      use LatLonPoints.lonToString
      Make a nicely formatted representation of a longitude, eg 120.3W or 99.99E.
      Parameters:
      lon - the longitude.
      ndec - number of digits to right of decimal point
      Returns:
      String representation.
    • getLongitude

      public double getLongitude()
      Deprecated.
      Returns the longitude, in degrees.
      Specified by:
      getLongitude in interface LatLonPoint
      Returns:
      the longitude, in degrees
    • getLatitude

      public double getLatitude()
      Deprecated.
      Returns the latitude, in degrees.
      Specified by:
      getLatitude in interface LatLonPoint
      Returns:
      the latitude, in degrees
    • set

      public void set(LatLonPoint pt)
      Deprecated.
      set lat, lon using values of pt
      Parameters:
      pt - point to use
    • set

      public void set(double lat, double lon)
      Deprecated.
      set lat, lon using double values
      Parameters:
      lat - lat value
      lon - lon value
    • set

      public void set(float lat, float lon)
      Deprecated.
      set lat, lon using float values
      Parameters:
      lat - lat value
      lon - lon value
    • setLongitude

      public void setLongitude(double lon)
      Deprecated.
      Set the longitude, in degrees. It is normalized to +/-180.
      Parameters:
      lon - east longitude in degrees
    • setLatitude

      public void setLatitude(double lat)
      Deprecated.
      Set the latitude, in degrees. Must lie beween +/-90
      Parameters:
      lat - north latitude in degrees
    • nearlyEquals

      public boolean nearlyEquals(LatLonPoint that, double maxRelDiff)
      Deprecated.
      Description copied from interface: LatLonPoint
      Returns true if this point is nearly equal to that. The "near equality" of points is determined using Misc.nearlyEquals(double, double, double), with the specified maxRelDiff.
      Specified by:
      nearlyEquals in interface LatLonPoint
      Parameters:
      that - the other point to check.
      maxRelDiff - the maximum relative difference the two points may have.
      Returns:
      true if this point is nearly equal to that.
    • equals

      public boolean equals(Object other)
      Deprecated.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Deprecated.
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Deprecated.
      Default string representation
      Overrides:
      toString in class Object
      Returns:
      string representing this point
    • toString

      @Deprecated public String toString(int sigDigits)
      Deprecated.
      use LatLonPoints.toString
      String representation in the form, eg 40.23N 105.1W
      Parameters:
      sigDigits - significant digits