Package ucar.unidata.geoloc
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:
LatLonPoint, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description LatLonPointImpl()Deprecated.use LatLonPoint.createLatLonPointImpl(double lat, double lon)Deprecated.use LatLonPoint.createLatLonPointImpl(LatLonPoint pt)Deprecated.use LatLonPoint.create
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static booleanbetweenLon(double lon, double lonBeg, double lonEnd)Deprecated.use LatLonPoints.betweenLonbooleanequals(Object other)Deprecated.static doublegetClockwiseDistanceTo(double from, double to)Deprecated.use LatLonPoints.getClockwiseDistanceTodoublegetLatitude()Deprecated.Returns the latitude, in degrees.doublegetLongitude()Deprecated.Returns the longitude, in degrees.inthashCode()Deprecated.static doublelatNormal(double lat)Deprecated.use LatLonPoints.latNormalstatic StringlatToString(double lat, int ndec)Deprecated.use LatLonPoints.latToStringstatic doublelonDiff(double lon1, double lon2)Deprecated.use LatLonPoints.lonDiffstatic doublelonNormal(double lon)Deprecated.use LatLonPoints.lonNormalstatic doublelonNormal(double lon, double center)Deprecated.use LatLonPoints.lonNormalstatic doublelonNormal360(double lon)Deprecated.use LatLonPoints.lonNormal360static doublelonNormalFrom(double lon, double start)Deprecated.use LatLonPoints.lonNormalFromstatic StringlonToString(double lon, int ndec)Deprecated.use LatLonPoints.lonToStringbooleannearlyEquals(LatLonPoint that, double maxRelDiff)Deprecated.Returnstrueif this point is nearly equal tothat.static doublerange180(double lon)Deprecated.use LatLonPoints.range180voidset(double lat, double lon)Deprecated.set lat, lon using double valuesvoidset(float lat, float lon)Deprecated.set lat, lon using float valuesvoidset(LatLonPoint pt)Deprecated.set lat, lon using values of ptvoidsetLatitude(double lat)Deprecated.Set the latitude, in degrees.voidsetLongitude(double lon)Deprecated.Set the longitude, in degrees.StringtoString()Deprecated.Default string representationStringtoString(int sigDigits)Deprecated.use LatLonPoints.toString-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ucar.unidata.geoloc.LatLonPoint
nearlyEquals
-
-
-
-
Constructor Detail
-
LatLonPointImpl
@Deprecated public LatLonPointImpl()
Deprecated.use LatLonPoint.create
-
LatLonPointImpl
@Deprecated public LatLonPointImpl(LatLonPoint pt)
Deprecated.use LatLonPoint.createCopy Constructor.
-
LatLonPointImpl
@Deprecated public LatLonPointImpl(double lat, double lon)
Deprecated.use LatLonPoint.createCreates a LatLonPoint from component latitude and longitude values. The longitude is adjusted to be in the range [-180.,180.].- Parameters:
lat- north latitude in degreeslon- east longitude in degrees
-
-
Method Detail
-
betweenLon
@Deprecated public static boolean betweenLon(double lon, double lonBeg, double lonEnd)
Deprecated.use LatLonPoints.betweenLonTest if point lies between two longitudes, deal with wrapping.- Parameters:
lon- point to testlonBeg- beginning longitudelonEnd- 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.range180put 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.lonNormal360put 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.lonNormalput longitude into the range [center +/- 180] deg- Parameters:
lon- lon to normalizecenter- center point- Returns:
- longitude into the range [center +/- 180] deg
-
lonNormalFrom
@Deprecated public static double lonNormalFrom(double lon, double start)
Deprecated.use LatLonPoints.lonNormalFromput longitude into the range [start, start+360] deg- Parameters:
lon- lon to normalizestart- starting point- Returns:
- longitude into the [start, start+360] deg
-
lonNormal
@Deprecated public static double lonNormal(double lon)
Deprecated.use LatLonPoints.lonNormalNormalize 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.lonDiffFind difference (lon1 - lon2) normalized so that maximum value is += 180.- Parameters:
lon1- startlon2- end- Returns:
- normalized difference
-
latNormal
@Deprecated public static double latNormal(double lat)
Deprecated.use LatLonPoints.latNormalNormalize 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.latToStringMake 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.lonToStringMake 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:
getLongitudein interfaceLatLonPoint- Returns:
- the longitude, in degrees
-
getLatitude
public double getLatitude()
Deprecated.Returns the latitude, in degrees.- Specified by:
getLatitudein interfaceLatLonPoint- 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 valuelon- lon value
-
set
public void set(float lat, float lon)Deprecated.set lat, lon using float values- Parameters:
lat- lat valuelon- 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:LatLonPointReturnstrueif this point is nearly equal tothat. The "near equality" of points is determined usingMisc.nearlyEquals(double, double, double), with the specified maxRelDiff.- Specified by:
nearlyEqualsin interfaceLatLonPoint- Parameters:
that- the other point to check.maxRelDiff- the maximumrelative differencethe two points may have.- Returns:
trueif this point is nearly equal tothat.
-
toString
public String toString()
Deprecated.Default string representation
-
toString
@Deprecated public String toString(int sigDigits)
Deprecated.use LatLonPoints.toStringString representation in the form, eg 40.23N 105.1W- Parameters:
sigDigits- significant digits
-
-