public final class UTM extends Coordinates<ProjectedCRS<?>>
projected
Universal Transverse Mercator (UTM) coordinates onto the WGS84 ellipsoid.
The UTM system is limited to values between -80 and +84 degrees latitude. Values beyond these limits (i.e., the polar regions) are projected using the Universal Polar Stereographic (UPS) projection. Although mathematically distinct, the two projections are represented identically. This class returns correct results for both UTM and UPS projections. The conversion routines for this class were derived from formulas described in the Defense Mapping Agency Technical Manual 8358.2.
Modifier and Type | Field and Description |
---|---|
static ProjectedCRS<UTM> |
CRS
Holds the coordinate reference system for all instances of this class.
|
static Measure<java.lang.Integer,Length> |
UPS_FALSE_EASTING
The UPS "false easting" value.
|
static Measure<java.lang.Integer,Length> |
UPS_FALSE_NORTHING
The UPS "false northing" value.
|
static double |
UPS_SCALE_FACTOR
The UPS scale factor.
|
static Measure<java.lang.Integer,Length> |
UTM_FALSE_EASTING
The UTM "false easting" value.
|
static Measure<java.lang.Integer,Length> |
UTM_FALSE_NORTHING
The UTM "false northing" value.
|
static Measure<java.lang.Integer,Angle> |
UTM_NORTHERN_LIMIT
The northern limit of the UTM grid.
|
static double |
UTM_SCALE_FACTOR
The UTM scale factor.
|
static Measure<java.lang.Integer,Angle> |
UTM_SOUTHERN_LIMIT
The southern limit of the UTM grid.
|
Modifier and Type | Method and Description |
---|---|
UTM |
copy()
Returns a copy of these coordinates
allocated
by the calling thread (possibly on the stack). |
double |
eastingValue(Unit<Length> unit)
Returns the projected distance of the position from the central meridian.
|
static double |
getCentralMeridian(int longitudeZone,
char latitudeZone)
Returns the central meridian (in radians) for the specified
UTM/UPS zone.
|
ProjectedCRS<UTM> |
getCoordinateReferenceSystem()
Returns the reference system for this coordinates.
|
int |
getDimension()
OpenGIS® - The length of coordinate sequence (the number of entries).
|
static char |
getLatitudeZone(LatLong latLong)
Returns the UTM/UPS latitude zone identifier for the specified coordinates.
|
static int |
getLongitudeZone(LatLong latLong)
Returns the UTM/UPS longitude zone number for the specified
coordinates.
|
double |
getOrdinate(int dimension)
OpenGIS® - Returns the ordinate at the specified dimension.
|
static boolean |
isNorthPolar(LatLong latLong)
Returns true if the position indicated by the coordinates is
north of the northern limit of the UTM grid (84 degrees).
|
static boolean |
isSouthPolar(LatLong latLong)
Returns true if the position indicated by the coordinates is
south of the southern limit of the UTM grid (-80 degrees).
|
char |
latitudeZone()
Returns the latitude zone identifier.
|
static UTM |
latLongToUps(LatLong latLong,
ReferenceEllipsoid ellipsoid)
Converts latitude/longitude coordinates to UPS coordinates based on
the specified reference ellipsoid.
|
static UTM |
latLongToUtm(LatLong latLong,
ReferenceEllipsoid ellipsoid)
Converts latitude/longitude coordinates to UTM coordinates based on
the specified reference ellipsoid.
|
int |
longitudeZone()
Returns the longitude zone identifier.
|
double |
northingValue(Unit<Length> unit)
Returns the projected distance of the point from the equator.
|
static LatLong |
upsToLatLong(UTM ups,
ReferenceEllipsoid ellipsoid)
Converts the UPS coordinates to latitude/longitude coordinates,
based on the specified reference ellipsoid.
|
static LatLong |
utmToLatLong(UTM utm,
ReferenceEllipsoid ellipsoid)
Converts the UTM coordinates to latitude/longitude coordinates,
based on the specified reference ellipsoid.
|
static UTM |
valueOf(int longitudeZone,
char latitudeZone,
double easting,
double northing,
Unit<Length> unit)
Returns the projected UTM position corresponding to the specified
coordinates.
|
clone, getCoordinates, getPosition, setOrdinate, toString, toText
public static final double UTM_SCALE_FACTOR
public static Measure<java.lang.Integer,Length> UTM_FALSE_EASTING
public static Measure<java.lang.Integer,Length> UTM_FALSE_NORTHING
public static final Measure<java.lang.Integer,Angle> UTM_NORTHERN_LIMIT
public static final Measure<java.lang.Integer,Angle> UTM_SOUTHERN_LIMIT
public static final double UPS_SCALE_FACTOR
public static Measure<java.lang.Integer,Length> UPS_FALSE_EASTING
public static Measure<java.lang.Integer,Length> UPS_FALSE_NORTHING
public static final ProjectedCRS<UTM> CRS
public static UTM valueOf(int longitudeZone, char latitudeZone, double easting, double northing, Unit<Length> unit)
longitudeZone
- the longitude zone number.latitudeZone
- the longitude zone character.easting
- the easting value stated in the specified unit.northing
- the northing value stated in the specified unit.unit
- the easting/northing length unit.public final int longitudeZone()
public final char latitudeZone()
public final double eastingValue(Unit<Length> unit)
unit
- the length unit of the easting to return.public final double northingValue(Unit<Length> unit)
unit
- the length unit of the northing to return.public ProjectedCRS<UTM> getCoordinateReferenceSystem()
Coordinates
getCoordinateReferenceSystem
in class Coordinates<ProjectedCRS<?>>
public int getDimension()
Coordinates
getDimension
in class Coordinates<ProjectedCRS<?>>
public double getOrdinate(int dimension) throws java.lang.IndexOutOfBoundsException
Coordinates
getOrdinate
in class Coordinates<ProjectedCRS<?>>
dimension
- The dimension in the range 0 to
dimension-1.java.lang.IndexOutOfBoundsException
- if the specified dimension is out
of bounds.public static boolean isNorthPolar(LatLong latLong)
latLong
- The coordinates.public static boolean isSouthPolar(LatLong latLong)
latLong
- The coordinates.public static char getLatitudeZone(LatLong latLong)
latLong
- The coordinates.public static int getLongitudeZone(LatLong latLong)
latLong
- The coordinates.public static double getCentralMeridian(int longitudeZone, char latitudeZone)
longitudeZone
- The UTM/UPS longitude zone number.latitudeZone
- The UTM/UPS latitude zone character.public static UTM latLongToUtm(LatLong latLong, ReferenceEllipsoid ellipsoid)
latLong
- The latitude/longitude coordinates.ellipsoid
- The reference ellipsoid.public static UTM latLongToUps(LatLong latLong, ReferenceEllipsoid ellipsoid)
latLong
- The latitude/longitude coordinates.ellipsoid
- The reference ellipsoid.public static LatLong utmToLatLong(UTM utm, ReferenceEllipsoid ellipsoid)
utm
- The UTM coordinates.ellipsoid
- The reference ellipsoid.public static LatLong upsToLatLong(UTM ups, ReferenceEllipsoid ellipsoid)
ups
- The UPS coordinates.ellipsoid
- The reference ellipsoid.public UTM copy()
Coordinates
allocated
by the calling thread (possibly on the stack).copy
in interface javolution.lang.ValueType
copy
in class Coordinates<ProjectedCRS<?>>