A minimum bounding box or rectangle. Regardless of dimension, an {@code Envelope} canbe represented without ambiguity as two {@linkplain DirectPosition direct positions}(coordinate points). To encode an {@code Envelope}, it is sufficient to encode these two points. {@note
Envelope
uses an arbitrary
Coordinate Reference System, whichdoesn't need to be geographic. This is different than the
GeographicBoundingBox
class provided in the metadata package, which can be used as a kind of envelope restricted to a Geographic CRS having Greenwich prime meridian.}This particular implementation of {@code Envelope} is said "General" because it usescoordinates of an arbitrary number of dimensions. This is in contrast with {@link Envelope2D}, which can use only two-dimensional coordinates.
A {@code GeneralEnvelope} can be created in various ways:
- {@linkplain #GeneralEnvelope(int) From a given number of dimension}, with all ordinates initialized to 0.
- {@linkplain #GeneralEnvelope(double[],double[]) From two coordinate points}.
- {@linkplain #GeneralEnvelope(Envelope) From a an other envelope} (copy constructor).
- {@linkplain #GeneralEnvelope(GeographicBoundingBox) From a geographic bounding box}.
- {@linkplain #GeneralEnvelope(CharSequence) From a character sequence}representing a {@code BBOX} or a Well Known Text (WKT) format.
{@section Spanning the anti-meridian of a Geographic CRS}The
Web Coverage Service (WCS) specification authorizes (with special treatment) cases where
upper <
lower at least in the longitude case. They are envelopes crossing the anti-meridian, like the red box below (the green box is the usual case). The default implementation of methods listed in the right column can handle such cases.
| Supported methods: - {@link #getMinimum(int)}
- {@link #getMaximum(int)}
- {@link #getMedian(int)}
- {@link #getSpan(int)}
- {@link #isEmpty()}
- {@link #contains(DirectPosition) contains(DirectPosition)}
- {@link #contains(Envelope,boolean) contains(Envelope, boolean)}
- {@link #intersects(Envelope,boolean) intersects(Envelope, boolean)}
- {@link #intersect(Envelope)}
- {@link #add(Envelope)}
- {@link #add(DirectPosition)}
|
@author Martin Desruisseaux (IRD, Geomatys)
@author Johann Sorel (Geomatys)
@since 0.3 (derived from geotk-2.4)
@version 0.3
@module
@see Envelope2D
@see org.apache.sis.metadata.iso.extent.DefaultGeographicBoundingBox