|
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 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 |
boolean |
equals(java.lang.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 . |
static Angle |
greatCircleAzimuth(LatLon p1,
LatLon p2)
Computes the azimuth angle (clockwise from North) that points from the first location to the second location. |
static Angle |
greatCircleDistance(LatLon p1,
LatLon p2)
Computes the great circle angular distance between two locations. |
static LatLon |
greatCircleEndPosition(LatLon p,
Angle greatCircleAzimuth,
Angle pathLength)
Computes the location on a great circle arc with the given starting location, azimuth, and arc distance. |
static LatLon |
greatCircleEndPosition(LatLon p,
double greatCircleAzimuthRadians,
double pathLengthRadians)
Computes the location on a great circle arc with the given starting location, azimuth, and arc distance. |
int |
hashCode()
|
static LatLon |
interpolate(double amount,
LatLon value1,
LatLon value2)
|
static boolean |
positionsCrossDateLine(java.lang.Iterable<LatLon> positions)
|
static boolean |
positionsCrossLongitudeBoundary(LatLon p1,
LatLon p2)
|
static Angle |
rhumbAzimuth(LatLon p1,
LatLon p2)
Computes the azimuth angle (clockwise from North) of a rhumb line (a line of constant heading) between two locations. |
static Angle |
rhumbDistance(LatLon p1,
LatLon p2)
Computes the length of the rhumb line between two locations. |
static LatLon |
rhumbEndPosition(LatLon p,
Angle rhumbAzimuth,
Angle pathLength)
Computes the location on a rhumb line with the given starting location, rhumb azimuth, and arc distance along the line. |
static LatLon |
rhumbEndPosition(LatLon p,
double rhumbAzimuthRadians,
double pathLengthRadians)
Computes the location on a rhumb line with the given starting location, rhumb azimuth, and arc distance along the line. |
LatLon |
subtract(LatLon that)
|
LatLon |
subtract(Position that)
|
java.lang.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
java.lang.IllegalArgumentException
- if latitude
or longitude
is nullMethod Detail |
---|
public LatLon add(LatLon that)
public LatLon add(Position that)
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 boolean equals(java.lang.Object o)
equals
in class java.lang.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 static Angle greatCircleAzimuth(LatLon p1, LatLon p2)
p1
- LatLon of the first locationp2
- LatLon of the second location
public static Angle greatCircleDistance(LatLon p1, LatLon p2)
p1
- LatLon of the first locationp2
- LatLon of the second location
public static LatLon greatCircleEndPosition(LatLon p, Angle greatCircleAzimuth, Angle pathLength)
p
- LatLon of the starting locationgreatCircleAzimuth
- great circle azimuth angle (clockwise from North)pathLength
- arc distance to travel
public static LatLon greatCircleEndPosition(LatLon p, double greatCircleAzimuthRadians, double pathLengthRadians)
p
- LatLon of the starting locationgreatCircleAzimuthRadians
- great circle azimuth angle (clockwise from North), in radianspathLengthRadians
- arc distance to travel, in radians
public int hashCode()
hashCode
in class java.lang.Object
public static LatLon interpolate(double amount, LatLon value1, LatLon value2)
public static boolean positionsCrossDateLine(java.lang.Iterable<LatLon> positions)
public static boolean positionsCrossLongitudeBoundary(LatLon p1, LatLon p2)
public static Angle rhumbAzimuth(LatLon p1, LatLon p2)
p1
- LatLon of the first locationp2
- LatLon of the second location
public static Angle rhumbDistance(LatLon p1, LatLon p2)
p1
- LatLon of the first locationp2
- LatLon of the second location
public static LatLon rhumbEndPosition(LatLon p, Angle rhumbAzimuth, Angle pathLength)
p
- LatLon of the starting locationrhumbAzimuth
- rhumb azimuth angle (clockwise from North)pathLength
- arc distance to travel
public static LatLon rhumbEndPosition(LatLon p, double rhumbAzimuthRadians, double pathLengthRadians)
p
- LatLon of the starting locationrhumbAzimuthRadians
- rhumb azimuth angle (clockwise from North), in radianspathLengthRadians
- arc distance to travel, in radians
public LatLon subtract(LatLon that)
public LatLon subtract(Position that)
public java.lang.String toString()
toString
in class java.lang.Object
|
NASA World Wind | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |