Package org.opengis.geometry
Interface BoundingBox

 All Superinterfaces:
Envelope
@Deprecated public interface BoundingBox extends Envelope
Deprecated.See GEO231.Represents a twodimensional envelope. This interface combines the ideas ofGeographicBoundingBox
with those ofEnvelope
. It provides convenience methods to assist in accessing the formal properties of this object. Those methods (for examplegetMinX()
) match common usage in existing libraries like Java2D.This object contains no additional information beyond that provided by
Envelope
. Since:
 GeoAPI 2.1


Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description boolean
contains(double x, double y)
Deprecated.Returnstrue
if the provided location is contained by this bounding box.boolean
contains(BoundingBox bounds)
Deprecated.Returnstrue
if the provided bounds are contained by this bounding box.boolean
contains(DirectPosition location)
Deprecated.Returnstrue
if the provided location is contained by this bounding box.double
getHeight()
Deprecated.double
getMaxX()
Deprecated.Provides the maximum ordinate along the first axis.double
getMaxY()
Deprecated.Provides the maximum ordinate along the second axis.double
getMinX()
Deprecated.Provides the minimum ordinate along the first axis.double
getMinY()
Deprecated.Provides the minimum ordinate along the second axis.double
getWidth()
Deprecated.void
include(double x, double y)
Deprecated.Includes the provided coordinates, expanding as necessary.void
include(BoundingBox bounds)
Deprecated.Includes the provided bounding box, expanding as necesary.boolean
intersects(BoundingBox bounds)
Deprecated.Returnstrue
if the interior of this bounds intersects the interior of the provided bounds.boolean
isEmpty()
Deprecated.Returnstrue
if spans along all dimension are zero or negative.void
setBounds(BoundingBox bounds)
Deprecated.Sets this bounding box to be the same as the specified box.BoundingBox
toBounds(CoordinateReferenceSystem targetCRS)
Deprecated.Transforms this box to the specified CRS and returns a new bounding box for the transformed shape.



Method Detail

setBounds
void setBounds(BoundingBox bounds)
Deprecated.Sets this bounding box to be the same as the specified box. Parameters:
bounds
 The new bounds.

getMinX
double getMinX()
Deprecated.Provides the minimum ordinate along the first axis. This is equivalent togetMinimum(0)
. There is no guarantee that this axis is oriented toward East. Returns:
 the minimum ordinate along the first axis.

getMaxX
double getMaxX()
Deprecated.Provides the maximum ordinate along the first axis. This is equivalent togetMaximum(0)
. There is no guarantee that this axis is oriented toward East. Returns:
 the maximum ordinate along the first axis.

getMinY
double getMinY()
Deprecated.Provides the minimum ordinate along the second axis. This is equivalent togetMinimum(1)
. There is no guarantee that this axis is oriented toward North. Returns:
 the minimum ordinate along the second axis.

getMaxY
double getMaxY()
Deprecated.Provides the maximum ordinate along the second axis. This is equivalent togetMaximum(1)
. There is no guarantee that this axis is oriented toward North. Returns:
 the maximum ordinate along the second axis.

getWidth
double getWidth()
Deprecated.Provides the difference between minimum and maximum ordinate along the first axis. This is equivalent togetSpan(0)
. There is no guarantee that this axis is oriented toward East. Returns:
 the span along the first axis.

getHeight
double getHeight()
Deprecated.Provides the difference between minimum and maximum ordinate along the second axis. This is equivalent togetSpan(1)
. There is no guarantee that this axis is oriented toward North. Returns:
 the span along the second axis.

isEmpty
boolean isEmpty()
Deprecated.Returnstrue
if spans along all dimension are zero or negative. Returns:
true
if this bounding box is empty.

include
void include(BoundingBox bounds)
Deprecated.Includes the provided bounding box, expanding as necesary. Parameters:
bounds
 The bounds to add to this geographic bounding box.

include
void include(double x, double y)
Deprecated.Includes the provided coordinates, expanding as necessary. Note that there is no guarantee that the (x, x) values are oriented toward (East, North), since it depends on the envelope CRS. Parameters:
x
 The first ordinate value.y
 The second ordinate value.

intersects
boolean intersects(BoundingBox bounds)
Deprecated.Returnstrue
if the interior of this bounds intersects the interior of the provided bounds. Parameters:
bounds
 The bounds to test for intersection. Returns:
true
if the two bounds intersect.

contains
boolean contains(BoundingBox bounds)
Deprecated.Returnstrue
if the provided bounds are contained by this bounding box. Parameters:
bounds
 The bounds to test for inclusion. Returns:
true
if the given bounds is inside this bounds.

contains
boolean contains(DirectPosition location)
Deprecated.Returnstrue
if the provided location is contained by this bounding box. Parameters:
location
 The direct position to test for inclusion. Returns:
true
if the given position is inside this bounds.

contains
boolean contains(double x, double y)
Deprecated.Returnstrue
if the provided location is contained by this bounding box. Note that there is no guarantee that the (x, x) values are oriented toward (East, North), since it depends on the envelope CRS. Parameters:
x
 The first ordinate value.y
 The second ordinate value. Returns:
true
if the given position is inside this bounds.

toBounds
BoundingBox toBounds(CoordinateReferenceSystem targetCRS) throws TransformException
Deprecated.Transforms this box to the specified CRS and returns a new bounding box for the transformed shape. This method provides a convenient (while not always efficient) way to get minimum and maximum ordinate values toward some specific axis directions, typically East and North.Example: if
box
is a bounding box using a geographic CRS with WGS84 datum, then one can write:
Be aware thatGeographicCRS targetCRS = crsAuthorityFactory.createGeographicCRS("EPSG:4326"); BoundingBox targetBox = box.toBounds(targetCRS); double minEasting = targetBox.getMinY(); double minNorthing = targetBox.getMinX();
"EPSG:4326"
has (latitude, longitude) axis order, thus the inversion of X and Y in the above code.Sophisticated applications will typically provide more efficient way to perform similar transformations in their context. For example a canvas may store precomputed "objective to display" transforms.
 Parameters:
targetCRS
 The target CRS for the bounding box to be returned. Returns:
 a new bounding box wich includes the shape of this box transformed to the specified target CRS.
 Throws:
TransformException
 if no transformation path has been found from this box CRS to the specified target CRS, or if the transformation failed for an other reason.

