public class CartographicExtent extends Object implements IEquatable<CartographicExtent>, IEquatableEpsilon<CartographicExtent>
| Constructor and Description |
|---|
CartographicExtent(double west,
double south,
double east,
double north)
|
CartographicExtent(double west,
double south,
double east,
double north,
double piInNativeUnits)
Initializes a new instance with the specified coordinate bounds.
|
CartographicExtent(double west,
double south,
double east,
double north,
double longitudePiInNativeUnits,
double latitudePiInNativeUnits)
Initializes a new instance with the specified coordinate bounds.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
equals(CartographicExtent left,
CartographicExtent right)
Returns
true if the two instances are exactly equal. |
boolean |
equals(Object obj)
Indicates whether another object is exactly equal to this instance.
|
boolean |
equalsEpsilon(CartographicExtent 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(CartographicExtent other)
Indicates whether another instance of this type is exactly equal to this instance.
|
Cartographic |
getCenter()
Gets the center of the extent.
|
double |
getEastLongitude()
Gets the easternmost longitude.
|
double |
getLatitudePiInNativeUnits()
Gets the value of π in the native units of the latitude coordinate.
|
double |
getLength()
Gets the length of the extent.
|
double |
getLongitudePiInNativeUnits()
Gets the value of π in the native units of the longitude coordinate.
|
double |
getNorthLatitude()
Gets the northernmost latitude.
|
double |
getSouthLatitude()
Gets the southernmost latitude.
|
double |
getWestLongitude()
Gets the westernmost longitude.
|
double |
getWidth()
Gets the width of the extent.
|
int |
hashCode()
Returns a hash code for this instance, which is suitable for use in hashing algorithms and data structures like a hash table.
|
boolean |
isInsideExtent(double longitude,
double latitude)
Determines if the specified location is inside the extent.
|
boolean |
isInsideExtentEpsilon(double longitude,
double latitude,
double epsilon)
Determines if the specified location is inside the extent.
|
static boolean |
notEquals(CartographicExtent left,
CartographicExtent right)
Returns
true if the two instances are not exactly equal. |
String |
toString()
Returns the string representation of the value of this instance.
|
CartographicExtent |
union(CartographicExtent other)
Computes the union of this extent with another extent.
|
public CartographicExtent(double west,
double south,
double east,
double north)
LongitudePiInNativeUnits (get)
and LatitudePiInNativeUnits (get) in radians.west - The westernmost longitude.south - The southernmost latitude.east - The easternmost longitude.north - The northernmost latitude.public CartographicExtent(double west,
double south,
double east,
double north,
double piInNativeUnits)
west - The westernmost longitude.south - The southernmost latitude.east - The easternmost longitude.north - The northernmost latitude.piInNativeUnits - The value of π in native units for the longitude and latitude coordinates of the extent.public CartographicExtent(double west,
double south,
double east,
double north,
double longitudePiInNativeUnits,
double latitudePiInNativeUnits)
west - The westernmost longitude.south - The southernmost latitude.east - The easternmost longitude.north - The northernmost latitude.longitudePiInNativeUnits - The value of π in native units for the longitude coordinate of the extent.latitudePiInNativeUnits - The value of π in native units for the latitude coordinate of the extent.public final double getNorthLatitude()
public final double getSouthLatitude()
public final double getEastLongitude()
public final double getWestLongitude()
public final double getLongitudePiInNativeUnits()
public final double getLatitudePiInNativeUnits()
@Nonnull public final Cartographic getCenter()
Height of the center is set to 0.
public final double getWidth()
public final double getLength()
public final boolean isInsideExtentEpsilon(double longitude,
double latitude,
double epsilon)
longitude - The longitude.latitude - The latitude.epsilon - The value from the boundary that determines on-border inclusiveness.true if the specified location is inside the extent, or on the border (within epsilon); otherwise false.public final boolean isInsideExtent(double longitude,
double latitude)
longitude - The longitude.latitude - The latitude.true if the specified location is inside the extent, or on the border; otherwise false.@Nonnull public final CartographicExtent union(@Nonnull CartographicExtent other)
other - The other extent.ArgumentNullException - Thrown when other is null.IllegalStateException - Thrown when LongitudePiInNativeUnits (get) or LatitudePiInNativeUnits (get)
of the two extents are not compatible.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(CartographicExtent other)
equalsType in interface IEquatable<CartographicExtent>other - The instance to compare to this instance.true if other represents the same value as this instance; otherwise false.public final boolean equalsEpsilon(@Nullable CartographicExtent other, double epsilon)
equalsEpsilon in interface IEquatableEpsilon<CartographicExtent>other - The set of CartographicExtent 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. A negative tolerance effectively contracts the extent; a positive tolerance effectively expands the extent.public int hashCode()
hashCode in class ObjectObject.equals(java.lang.Object),
System.identityHashCode(java.lang.Object)public static boolean equals(CartographicExtent left, CartographicExtent 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(CartographicExtent left, CartographicExtent 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.