public class Position extends Location
| Modifier and Type | Field and Description |
|---|---|
double |
altitude
The position's altitude in meters.
|
| Constructor and Description |
|---|
Position()
Constructs a position with latitude, longitude and altitude all 0.
|
Position(double latitude,
double longitude,
double altitude)
Constructs a position with a specified latitude and longitude in degrees and altitude in meters.
|
Position(Position position)
Constructs a position with the latitude, longitude and altitude of a specified position.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
static Position |
fromDegrees(double latitudeDegrees,
double longitudeDegrees,
double altitude)
Constructs a position with a specified latitude and longitude in degrees and altitude in meters.
|
static Position |
fromRadians(double latitudeRadians,
double longitudeRadians,
double altitude)
Constructs a position with a specified latitude and longitude in radians and altitude in meters.
|
int |
hashCode() |
Position |
interpolateAlongPath(Position endPosition,
int pathType,
double amount,
Position result)
Compute a position along a path between two positions.
|
Position |
set(double latitude,
double longitude,
double altitude)
Sets this position to a specified latitude and longitude in degrees and altitude in meters.
|
Position |
set(Position position)
Sets this position to the latitude, longitude and altitude of a specified position.
|
java.lang.String |
toString() |
clampLatitude, clampLongitude, fromDegrees, fromRadians, fromTimeZone, greatCircleAzimuth, greatCircleDistance, greatCircleLocation, interpolateAlongPath, linearAzimuth, linearDistance, linearLocation, locationsCrossAntimeridian, normalizeLatitude, normalizeLongitude, rhumbAzimuth, rhumbDistance, rhumbLocation, set, setpublic Position()
public Position(double latitude,
double longitude,
double altitude)
latitude - the latitude in degreeslongitude - the longitude in degreesaltitude - the altitude in meterspublic Position(Position position)
position - the position specifying the coordinatesjava.lang.IllegalArgumentException - If the position is nullpublic static Position fromDegrees(double latitudeDegrees, double longitudeDegrees, double altitude)
latitudeDegrees - the latitude in degreeslongitudeDegrees - the longitude in degreesaltitude - the altitude in meterspublic static Position fromRadians(double latitudeRadians, double longitudeRadians, double altitude)
latitudeRadians - the latitude in radianslongitudeRadians - the longitude in radiansaltitude - the altitude in meterspublic Position set(double latitude, double longitude, double altitude)
latitude - the new latitude in degreeslongitude - the new longitude in degreesaltitude - the new altitude in meterspublic Position set(Position position)
position - the position specifying the new coordinatesjava.lang.IllegalArgumentException - If the position is nullpublic Position interpolateAlongPath(Position endPosition, int pathType, double amount, Position result)
endPosition - the path's end positionpathType - WorldWind.PathType indicating type of path to assumeamount - the fraction of the path at which to compute a positionresult - a pre-allocated Position in which to return the computed resultjava.lang.IllegalArgumentException - If either of the end position or the result argument is null