Package ucar.unidata.geoloc
Interface LatLonPoint
-
- All Known Implementing Classes:
LatLonPointImmutable
,LatLonPointImpl
public interface LatLonPoint
Points on the Earth's surface, represented as (longitude,latitude), in units of degrees. Longitude is always between -180 and +180 deg. Latitude is always between -90 and +90 deg. TODO will be an Immutable class in ver6
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static LatLonPoint
create()
Standard way to create a "default" LatLonPoint.static LatLonPoint
create(double lat, double lon)
Standard way to create a LatLonPoint.double
getLatitude()
Returns the latitude, between +/- 90 degrees.double
getLongitude()
Returns the longitude, between +/-180 degreesdefault boolean
nearlyEquals(LatLonPoint that)
Returns the result ofnearlyEquals(LatLonPoint, double)
, withMisc.defaultMaxRelativeDiffDouble
.boolean
nearlyEquals(LatLonPoint that, double maxRelDiff)
Returnstrue
if this point is nearly equal tothat
.
-
-
-
Method Detail
-
getLongitude
double getLongitude()
Returns the longitude, between +/-180 degrees- Returns:
- longitude (degrees)
-
getLatitude
double getLatitude()
Returns the latitude, between +/- 90 degrees.- Returns:
- latitude (degrees)
-
nearlyEquals
default boolean nearlyEquals(LatLonPoint that)
Returns the result ofnearlyEquals(LatLonPoint, double)
, withMisc.defaultMaxRelativeDiffDouble
.
-
nearlyEquals
boolean nearlyEquals(LatLonPoint that, double maxRelDiff)
Returnstrue
if this point is nearly equal tothat
. The "near equality" of points is determined usingMisc.nearlyEquals(double, double, double)
, with the specified maxRelDiff.- Parameters:
that
- the other point to check.maxRelDiff
- the maximumrelative difference
the two points may have.- Returns:
true
if this point is nearly equal tothat
.
-
create
static LatLonPoint create(double lat, double lon)
Standard way to create a LatLonPoint.
-
create
static LatLonPoint create()
Standard way to create a "default" LatLonPoint.
-
-