Package ucar.unidata.geoloc
Class LatLonPointImpl
java.lang.Object
ucar.unidata.geoloc.LatLonPointImpl
- All Implemented Interfaces:
Serializable,LatLonPoint
- Direct Known Subclasses:
LatLonPointImmutable
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
ConstructorsConstructorDescriptionDeprecated.use LatLonPoint.createLatLonPointImpl(double lat, double lon) Deprecated.use LatLonPoint.createDeprecated.use LatLonPoint.create -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanbetweenLon(double lon, double lonBeg, double lonEnd) Deprecated.use LatLonPoints.betweenLonbooleanDeprecated.static doublegetClockwiseDistanceTo(double from, double to) Deprecated.use LatLonPoints.getClockwiseDistanceTodoubleDeprecated.Returns the latitude, in degrees.doubleDeprecated.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.toString()Deprecated.Default string representationtoString(int sigDigits) Deprecated.use LatLonPoints.toStringMethods inherited from interface ucar.unidata.geoloc.LatLonPoint
nearlyEquals
-
Constructor Details
-
LatLonPointImpl
Deprecated.use LatLonPoint.create -
LatLonPointImpl
Deprecated.use LatLonPoint.createCopy Constructor. -
LatLonPointImpl
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 Details
-
betweenLon
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.use LatLonPoints.getClockwiseDistanceTo -
range180
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.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.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.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.use LatLonPoints.lonNormalNormalize the longitude to lie between +/-180- Parameters:
lon- east latitude in degrees- Returns:
- normalized lon
-
lonDiff
Deprecated.use LatLonPoints.lonDiffFind difference (lon1 - lon2) normalized so that maximum value is += 180.- Parameters:
lon1- startlon2- end- Returns:
- normalized difference
-
latNormal
Deprecated.use LatLonPoints.latNormalNormalize the latitude to lie between +/-90- Parameters:
lat- north latitude in degrees- Returns:
- normalized lat
-
latToString
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.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
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
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.
-
equals
Deprecated. -
hashCode
public int hashCode()Deprecated. -
toString
Deprecated.Default string representation -
toString
Deprecated.use LatLonPoints.toStringString representation in the form, eg 40.23N 105.1W- Parameters:
sigDigits- significant digits
-