public class UPSCoord
extends java.lang.Object
Constructor and Description |
---|
UPSCoord(Angle latitude,
Angle longitude,
java.lang.String hemisphere,
double easting,
double northing)
Create an arbitrary set of UPS coordinates with the given values.
|
Modifier and Type | Method and Description |
---|---|
static UPSCoord |
fromLatLon(Angle latitude,
Angle longitude)
Create a set of UPS coordinates from a pair of latitude and longitude for a WGS84 globe.
|
static UPSCoord |
fromLatLon(Angle latitude,
Angle longitude,
Globe globe)
Create a set of UPS coordinates from a pair of latitude and longitude for the given
Globe . |
static UPSCoord |
fromUPS(java.lang.String hemisphere,
double easting,
double northing,
Globe globe)
Create a set of UPS coordinates for the given
Globe . |
static UPSCoord |
fromUTM(java.lang.String hemisphere,
double easting,
double northing)
Create a set of UPS coordinates for a WGS84 globe.
|
double |
getEasting() |
java.lang.String |
getHemisphere() |
Angle |
getLatitude() |
Angle |
getLongitude() |
double |
getNorthing() |
java.lang.String |
toString() |
public UPSCoord(Angle latitude, Angle longitude, java.lang.String hemisphere, double easting, double northing)
latitude
- the latitude Angle
.longitude
- the longitude Angle
.hemisphere
- the hemisphere, either AVKey.NORTH
or AVKey.SOUTH
.easting
- the easting distance in metersnorthing
- the northing distance in meters.java.lang.IllegalArgumentException
- if latitude
, longitude
, or hemisphere
is
null.public static UPSCoord fromLatLon(Angle latitude, Angle longitude)
latitude
- the latitude Angle
.longitude
- the longitude Angle
.UPSCoord
.java.lang.IllegalArgumentException
- if latitude
or longitude
is null, or the conversion to
UPS coordinates fails.public static UPSCoord fromLatLon(Angle latitude, Angle longitude, Globe globe)
Globe
.latitude
- the latitude Angle
.longitude
- the longitude Angle
.globe
- the Globe
- can be null (will use WGS84).UPSCoord
.java.lang.IllegalArgumentException
- if latitude
or longitude
is null, or the conversion to
UPS coordinates fails.public static UPSCoord fromUPS(java.lang.String hemisphere, double easting, double northing, Globe globe)
Globe
.hemisphere
- the hemisphere, either AVKey.NORTH
or AVKey.SOUTH
.easting
- the easting distance in metersnorthing
- the northing distance in meters.globe
- the Globe
- can be null (will use WGS84).UPSCoord
.java.lang.IllegalArgumentException
- if the conversion to UPS coordinates fails.public static UPSCoord fromUTM(java.lang.String hemisphere, double easting, double northing)
hemisphere
- the hemisphere, either AVKey.NORTH
or AVKey.SOUTH
.easting
- the easting distance in metersnorthing
- the northing distance in meters.UPSCoord
.java.lang.IllegalArgumentException
- if the conversion to UPS coordinates fails.public double getEasting()
public java.lang.String getHemisphere()
public Angle getLatitude()
public Angle getLongitude()
public double getNorthing()
public java.lang.String toString()
toString
in class java.lang.Object