|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@Extension public interface BoundingBox3D
Represents a three-dimensional envelope. Extends BoundingBox to support
the third dimension.
This interface combines the ideas of GeographicBoundingBox
with
those of Envelope
. It provides convenience methods to assist
in accessing the formal properties of this object.
This object contains no additional information beyond that provided
by Envelope
.
Method Summary | |
---|---|
boolean |
contains(double x,
double y,
double z)
Returns true if the provided location is contained by this bounding box. |
double |
getMaxZ()
Provides the maximum ordinate along the third axis. |
double |
getMinZ()
Provides the minimum ordinate along the third axis. |
void |
include(double x,
double y,
double z)
Includes the provided coordinates, expanding as necessary. |
BoundingBox |
toBounds(CoordinateReferenceSystem targetCRS)
Transforms this box to the specified CRS and returns a new bounding box for the transformed shape. |
Methods inherited from interface BoundingBox |
---|
contains, contains, contains, getHeight, getMaxX, getMaxY, getMinX, getMinY, getWidth, include, include, intersects, isEmpty, setBounds |
Methods inherited from interface Envelope |
---|
getCoordinateReferenceSystem, getDimension, getLowerCorner, getMaximum, getMedian, getMinimum, getSpan, getUpperCorner |
Method Detail |
---|
double getMinZ()
getMinimum(2)
.
double getMaxZ()
getMaximum(2)
.
void include(double x, double y, double z)
x
- The first ordinate value.y
- The second ordinate value.z
- The third ordinate value.boolean contains(double x, double y, double z)
true
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.
x
- The first ordinate value.y
- The second ordinate value.z
- The second ordinate value.
true
if the given position is inside this bounds.BoundingBox toBounds(CoordinateReferenceSystem targetCRS) throws TransformException
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.
Sophesticated applications will typically provide more efficient way to perform similar transformations in their context. For example Canvas store precomputed objective to display transforms.
toBounds
in interface BoundingBox
targetCRS
- The target CRS for the bounding box to be returned.
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |