A two-dimensional envelope on top of {@link Rectangle2D}. This implementation is provided for inter-operability between Java2D and GeoAPI.
This class inherits {@linkplain #x x} and {@linkplain #y y} fields.But despite their names, they don't need to be oriented toward {@linkplain AxisDirection#EAST East} and{@linkplain AxisDirection#NORTH North} respectively. The (x,y) axis can have anydirection and should be understood as ordinate 0 and ordinate 1 values instead. This is not specific to this implementation; in Java2D too, the visual axis orientation depend on the {@linkplain java.awt.Graphics2D#getTransform() affine transform in the graphics context}.
{@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 spanning the anti-meridian, like the red box below (the green box is the usual case). For {@code Envelope2D} objects, they are rectangle with negative {@linkplain #width width} or{@linkplain #height height} field values. The default implementation of methods listed in theright column can handle such cases.
| Supported methods: - {@link #getMinimum(int)}
- {@link #getMaximum(int)}
- {@link #getSpan(int)}
- {@link #getMedian(int)}
- {@link #isEmpty()}
- {@link #contains(double,double)}
- {@link #contains(Rectangle2D)} and its variant receiving {@code double} arguments
- {@link #intersects(Rectangle2D)} and its variant receiving {@code double} arguments
- {@link #createIntersection(Rectangle2D)}
- {@link #createUnion(Rectangle2D)}
- {@link #add(Rectangle2D)}
- {@link #add(double,double)}
|
The {@link #getMinX()}, {@link #getMinY()}, {@link #getMaxX()}, {@link #getMaxY()}, {@link #getCenterX()}, {@link #getCenterY()}, {@link #getWidth()} and {@link #getHeight()}methods delegate to the above-cited methods.
@author Martin Desruisseaux (IRD, Geomatys)
@author Johann Sorel (Geomatys)
@since 0.3 (derived from geotk-2.1)
@version 0.3
@module
@see GeneralEnvelope
@see org.apache.sis.metadata.iso.extent.DefaultGeographicBoundingBox