public final class UniversalTransverseMercator extends Object implements IEquatable<UniversalTransverseMercator>, IEquatableEpsilon<UniversalTransverseMercator>, ImmutableValueType
| Constructor and Description |
|---|
UniversalTransverseMercator()
Initializes a new instance.
|
UniversalTransverseMercator(int zone,
PoleIndicator hemisphere,
double easting,
double northing)
Initializes a set of
UniversalTransverseMercator coordinates from the provided values. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
Indicates whether another object is exactly equal to this instance.
|
static boolean |
equals(UniversalTransverseMercator left,
UniversalTransverseMercator right)
Returns
true if the two instances are exactly equal. |
boolean |
equalsEpsilon(UniversalTransverseMercator other,
double epsilon)
Indicates whether each coordinate value of another instance of this type
is within the required tolerance of the corresponding coordinate value of this instance.
|
boolean |
equalsType(UniversalTransverseMercator other)
Indicates whether another instance of this type is exactly equal to this instance.
|
double |
getEasting()
Gets the eastward distance of the location into the zone.
|
PoleIndicator |
getHemisphere()
Gets the hemisphere of the coordinates.
|
boolean |
getIsUndefined()
Gets a value indicating whether or not the
Easting (get) and Northing (get) coordinates for this
instance have the value Double.NaN, the Zone (get) is not in the
correct range, or the Hemisphere (get) is invalid. |
double |
getNorthing()
Gets the northward distance of the location into the zone.
|
static UniversalTransverseMercator |
getUndefined()
Gets a set of
UniversalTransverseMercator coordinates with
Easting (get) and Northing (get) values of Double.NaN,
Zone (get) 0, and Hemisphere (get) 0. |
int |
getZone()
Gets the longitude zone of the location.
|
int |
hashCode()
Returns a hash code for this instance, which is suitable for use in hashing algorithms and data structures like a hash table.
|
static boolean |
notEquals(UniversalTransverseMercator left,
UniversalTransverseMercator right)
Returns
true if the two instances are not exactly equal. |
String |
toString()
Returns the string representation of the value of this instance.
|
public UniversalTransverseMercator()
public UniversalTransverseMercator(int zone,
@Nonnull
PoleIndicator hemisphere,
double easting,
double northing)
UniversalTransverseMercator coordinates from the provided values.zone - The longitude zone indicator.hemisphere - The hemisphere indicator.easting - The eastward distance of the location into the zone.northing - The northward distance of the location into the zone.@Nonnull public static UniversalTransverseMercator getUndefined()
UniversalTransverseMercator coordinates with
Easting (get) and Northing (get) values of Double.NaN,
Zone (get) 0, and Hemisphere (get) 0.
Use IsUndefined (get) to test whether a UniversalTransverseMercator instance
is undefined since it will return true if the
Easting (get) or Northing (get) values are Double.NaN,
the Zone (get) is not in the correct range,
or the Hemisphere (get) is invalid.
public final int getZone()
@Nonnull public final PoleIndicator getHemisphere()
public final double getEasting()
public final double getNorthing()
public boolean equals(Object obj)
equals in class Objectobj - The object to compare to this instance.true if obj is an instance of this type and represents the same value as this instance; otherwise false.Object.hashCode(),
HashMappublic final boolean equalsType(@Nonnull UniversalTransverseMercator other)
equalsType in interface IEquatable<UniversalTransverseMercator>other - The instance to compare to this instance.true if other represents the same value as this instance; otherwise false.public final boolean equalsEpsilon(@Nonnull UniversalTransverseMercator other, double epsilon)
equalsEpsilon in interface IEquatableEpsilon<UniversalTransverseMercator>other - The set of UniversalTransverseMercator coordinates to compare to this instance.epsilon - The limit at which the absolute differences between the coordinate values will not be considered equal.true if the absolute differences are less than or equal to epsilon; otherwise false.public int hashCode()
hashCode in class ObjectObject.equals(java.lang.Object),
System.identityHashCode(java.lang.Object)public String toString()
public static boolean equals(@Nonnull UniversalTransverseMercator left, @Nonnull UniversalTransverseMercator right)
true if the two instances are exactly equal.left - The instance to compare to right.right - The instance to compare to left.true if left represents the same value as right; otherwise false.public static boolean notEquals(@Nonnull UniversalTransverseMercator left, @Nonnull UniversalTransverseMercator right)
true if the two instances are not exactly equal.left - The instance to compare to right.right - The instance to compare to left.true if left does not represent the same value as right; otherwise false.public final boolean getIsUndefined()
Easting (get) and Northing (get) coordinates for this
instance have the value Double.NaN, the Zone (get) is not in the
correct range, or the Hemisphere (get) is invalid.