public class UTMCoord
extends java.lang.Object
Constructor and Description |
---|
UTMCoord(Angle latitude,
Angle longitude,
int zone,
java.lang.String hemisphere,
double easting,
double northing)
Create an arbitrary set of UTM coordinates with the given values.
|
UTMCoord(Angle latitude,
Angle longitude,
int zone,
java.lang.String hemisphere,
double easting,
double northing,
Angle centralMeridian)
Create an arbitrary set of UTM coordinates with the given values.
|
Modifier and Type | Method and Description |
---|---|
static UTMCoord |
fromLatLon(Angle latitude,
Angle longitude)
Create a set of UTM coordinates from a pair of latitude and longitude for a WGS84 globe.
|
static UTMCoord |
fromLatLon(Angle latitude,
Angle longitude,
Globe globe)
Create a set of UTM coordinates from a pair of latitude and longitude for the given
Globe . |
static UTMCoord |
fromLatLon(Angle latitude,
Angle longitude,
java.lang.String datum) |
static UTMCoord |
fromUTM(int zone,
java.lang.String hemisphere,
double easting,
double northing)
Create a set of UTM coordinates for a WGS84 globe.
|
static UTMCoord |
fromUTM(int zone,
java.lang.String hemisphere,
double easting,
double northing,
Globe globe)
Create a set of UTM coordinates for the given
Globe . |
Angle |
getCentralMeridian() |
double |
getEasting() |
java.lang.String |
getHemisphere() |
Angle |
getLatitude() |
Angle |
getLongitude() |
double |
getNorthing() |
int |
getZone() |
static LatLon |
locationFromUTMCoord(int zone,
java.lang.String hemisphere,
double easting,
double northing,
Globe globe)
Convenience method for converting a UTM coordinate to a geographic location.
|
java.lang.String |
toString() |
public UTMCoord(Angle latitude, Angle longitude, int zone, java.lang.String hemisphere, double easting, double northing)
latitude
- the latitude Angle
.longitude
- the longitude Angle
.zone
- the UTM zone - 1 to 60.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
or longitude
is null.public UTMCoord(Angle latitude, Angle longitude, int zone, java.lang.String hemisphere, double easting, double northing, Angle centralMeridian)
latitude
- the latitude Angle
.longitude
- the longitude Angle
.zone
- the UTM zone - 1 to 60.hemisphere
- the hemisphere, either AVKey.NORTH
or AVKey.SOUTH
.easting
- the easting distance in metersnorthing
- the northing distance in meters.centralMeridian
- the cntral meridian Angle
.java.lang.IllegalArgumentException
- if latitude
or longitude
is null.public static UTMCoord fromLatLon(Angle latitude, Angle longitude)
latitude
- the latitude Angle
.longitude
- the longitude Angle
.UTMCoord
.java.lang.IllegalArgumentException
- if latitude
or longitude
is null, or the conversion to
UTM coordinates fails.public static UTMCoord 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).UTMCoord
.java.lang.IllegalArgumentException
- if latitude
or longitude
is null, or the conversion to
UTM coordinates fails.public static UTMCoord fromLatLon(Angle latitude, Angle longitude, java.lang.String datum)
public static UTMCoord fromUTM(int zone, java.lang.String hemisphere, double easting, double northing)
zone
- the UTM zone - 1 to 60.hemisphere
- the hemisphere, either AVKey.NORTH
or AVKey.SOUTH
.easting
- the easting distance in metersnorthing
- the northing distance in meters.UTMCoord
.java.lang.IllegalArgumentException
- if the conversion to UTM coordinates fails.public static UTMCoord fromUTM(int zone, java.lang.String hemisphere, double easting, double northing, Globe globe)
Globe
.zone
- the UTM zone - 1 to 60.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).UTMCoord
.java.lang.IllegalArgumentException
- if the conversion to UTM coordinates fails.public Angle getCentralMeridian()
public double getEasting()
public java.lang.String getHemisphere()
public Angle getLatitude()
public Angle getLongitude()
public double getNorthing()
public int getZone()
public static LatLon locationFromUTMCoord(int zone, java.lang.String hemisphere, double easting, double northing, Globe globe)
zone
- the UTM zone: 1 to 60.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).public java.lang.String toString()
toString
in class java.lang.Object