Package gov.nasa.worldwind.geom.coords
Class TMCoord
- java.lang.Object
-
- gov.nasa.worldwind.geom.coords.TMCoord
-
public class TMCoord extends java.lang.Object
This class holds a set of Transverse Mercator coordinates along with the corresponding latitude and longitude.- See Also:
TMCoordConverter
-
-
Constructor Summary
Constructors Constructor Description TMCoord(double latitude, double longitude, double easting, double northing)
Create an arbitrary set of Transverse Mercator coordinates with the given values.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TMCoord
fromLatLon(double latitude, double longitude, java.lang.Double a, java.lang.Double f, double originLatitude, double centralMeridian, double falseEasting, double falseNorthing, double scale)
Create a set of Transverse Mercator coordinates from a pair of latitude and longitude, for the givenGlobe
and projection parameters.static TMCoord
fromTM(double easting, double northing, double originLatitude, double centralMeridian, double falseEasting, double falseNorthing, double scale)
Create a set of Transverse Mercator coordinates for the givenGlobe
, easting, northing and projection parameters.double
getEasting()
double
getLatitude()
double
getLongitude()
double
getNorthing()
-
-
-
Constructor Detail
-
TMCoord
public TMCoord(double latitude, double longitude, double easting, double northing)
Create an arbitrary set of Transverse Mercator coordinates with the given values.- Parameters:
latitude
- the latitudedouble
.longitude
- the longitudedouble
.easting
- the easting distance value in meters.northing
- the northing distance value in meters.- Throws:
java.lang.IllegalArgumentException
- iflatitude
,longitude
,originLatitude
orcentralMeridian
is null.
-
-
Method Detail
-
fromLatLon
public static TMCoord fromLatLon(double latitude, double longitude, java.lang.Double a, java.lang.Double f, double originLatitude, double centralMeridian, double falseEasting, double falseNorthing, double scale)
Create a set of Transverse Mercator coordinates from a pair of latitude and longitude, for the givenGlobe
and projection parameters.- Parameters:
latitude
- the latitudedouble
.longitude
- the longitudedouble
.a
- semi-major ellipsoid radius. If this and argument f are non-null and globe is null, will use the specfied a and f.f
- ellipsoid flattening. If this and argument a are non-null and globe is null, will use the specfied a and f.originLatitude
- the origin latitudedouble
.centralMeridian
- the central meridian longitudedouble
.falseEasting
- easting value at the center of the projection in meters.falseNorthing
- northing value at the center of the projection in meters.scale
- scaling factor.- Returns:
- the corresponding
TMCoord
. - Throws:
java.lang.IllegalArgumentException
- iflatitude
orlongitude
is null, or the conversion to TM coordinates fails. If the globe is null conversion will default to using WGS84.
-
fromTM
public static TMCoord fromTM(double easting, double northing, double originLatitude, double centralMeridian, double falseEasting, double falseNorthing, double scale)
Create a set of Transverse Mercator coordinates for the givenGlobe
, easting, northing and projection parameters.- Parameters:
easting
- the easting distance value in meters.northing
- the northing distance value in meters.originLatitude
- the origin latitudedouble
.centralMeridian
- the central meridian longitudedouble
.falseEasting
- easting value at the center of the projection in meters.falseNorthing
- northing value at the center of the projection in meters.scale
- scaling factor.- Returns:
- the corresponding
TMCoord
. - Throws:
java.lang.IllegalArgumentException
- iforiginLatitude
orcentralMeridian
is null, or the conversion to geodetic coordinates fails. If the globe is null conversion will default to using WGS84.
-
getLatitude
public double getLatitude()
-
getLongitude
public double getLongitude()
-
getEasting
public double getEasting()
-
getNorthing
public double getNorthing()
-
-