|
NASA World Wind | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.worldwind.geom.LatLon
public class LatLon
Represents a point on the two-dimensional surface of a globe. Latitude is the degrees North and ranges between [-90, 90], while longitude refers to degrees East, and ranges between (-180, 180].
Instances ofLatLon
are immutable.
Field Summary | |
---|---|
static LatLon |
ZERO
|
Constructor Summary | |
---|---|
LatLon(Angle latitude,
Angle longitude)
Contructs a new LatLon from two angles. |
Method Summary | |
---|---|
LatLon |
add(LatLon that)
|
LatLon |
add(Position that)
|
static Angle |
azimuth(LatLon p1,
LatLon p2)
|
static double |
ellipsoidalDistance(LatLon p1,
LatLon p2,
double equatorialRadius,
double polarRadius)
Computes the distance between two points on an ellipsoid iteratively. |
Angle |
ellipsoidalForwardAzimuth(LatLon p1,
LatLon p2,
double equatorialRadius,
double polarRadius)
Compute the forward azimuth between two positions |
static LatLon |
endPosition(LatLon p,
double azimuthRadians,
double pathLengthRadians)
|
boolean |
equals(Object o)
|
static LatLon |
fromDegrees(double latitude,
double longitude)
Factory method for obtaining a new LatLon from two angles expressed in degrees. |
static LatLon |
fromRadians(double latitude,
double longitude)
Factor method for obtaining a new LatLon from two angles expressed in radians. |
Angle |
getLatitude()
Obtains the latitude of this LatLon . |
Angle |
getLongitude()
Obtains the longitude of this LatLon . |
int |
hashCode()
|
static LatLon |
interpolate(double amount,
LatLon value1,
LatLon value2)
|
static boolean |
positionsCrossDateLine(Iterable<LatLon> positions)
|
static boolean |
positionsCrossLongitudeBoundary(LatLon p1,
LatLon p2)
|
static Angle |
sphericalDistance(LatLon p1,
LatLon p2)
Computes the great circle angular distance between two locations. |
LatLon |
subtract(LatLon that)
|
LatLon |
subtract(Position that)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final LatLon ZERO
Constructor Detail |
---|
public LatLon(Angle latitude, Angle longitude)
LatLon
from two angles. Neither angle may be null.
latitude
- latitudelongitude
- longitude
IllegalArgumentException
- if latitude
or longitude
is nullMethod Detail |
---|
public LatLon add(LatLon that)
public LatLon add(Position that)
public static Angle azimuth(LatLon p1, LatLon p2)
public static double ellipsoidalDistance(LatLon p1, LatLon p2, double equatorialRadius, double polarRadius)
p1
- first positionp2
- second positionequatorialRadius
- the equatorial radius of the globe in meterspolarRadius
- the polar radius of the globe in meters
public Angle ellipsoidalForwardAzimuth(LatLon p1, LatLon p2, double equatorialRadius, double polarRadius)
p1
- first positionp2
- second positionequatorialRadius
- the equatorial radius of the globe in meterspolarRadius
- the polar radius of the globe in meters
public static LatLon endPosition(LatLon p, double azimuthRadians, double pathLengthRadians)
public boolean equals(Object o)
equals
in class Object
public static LatLon fromDegrees(double latitude, double longitude)
LatLon
from two angles expressed in degrees.
latitude
- in degreeslongitude
- in degrees
LatLon
from the given angles, which are expressed as degreespublic static LatLon fromRadians(double latitude, double longitude)
LatLon
from two angles expressed in radians.
latitude
- in radianslongitude
- in radians
LatLon
from the given angles, which are expressed as radianspublic final Angle getLatitude()
LatLon
.
LatLon
's latitudepublic final Angle getLongitude()
LatLon
.
LatLon
's longitudepublic int hashCode()
hashCode
in class Object
public static LatLon interpolate(double amount, LatLon value1, LatLon value2)
public static boolean positionsCrossDateLine(Iterable<LatLon> positions)
public static boolean positionsCrossLongitudeBoundary(LatLon p1, LatLon p2)
public static Angle sphericalDistance(LatLon p1, LatLon p2)
p1
- LatLon of the first locationp2
- LatLon of the second location
public LatLon subtract(LatLon that)
public LatLon subtract(Position that)
public String toString()
toString
in class Object
|
NASA World Wind | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |