|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectRectangularShape
Rectangle2D
Rectangle2D.Double
Envelope2D
Envelope2D
Envelope2D.
@Deprecated public class Envelope2D
A two-dimensional envelope on top of Rectangle2D. This implementation is provided for
inter-operability between Java2D and GeoAPI.
This class inherits x and y fields. But despite their names, they don't need to be oriented toward East and North respectively. The (x,y) axis can have any orientation 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 affine transform in the graphics context.
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 Envelope2D objects, they are rectangle with negative width or
height field values. The default implementation of methods listed in the
right column can handle such cases.
|
Supported methods:
|
Envelope2D.getMinX(), Envelope2D.getMinY(), Envelope2D.getMaxX(), Envelope2D.getMaxY(),
Envelope2D.getCenterX(), Envelope2D.getCenterY(), Envelope2D.getWidth() and Envelope2D.getHeight()
methods delegate to the above-cited methods.
GeneralEnvelope,
org.geotoolkit.geometry.jts.ReferencedEnvelope,
GeographicBoundingBox,
Serialized Form
| referencing/geotk-referencing (download) | View source code for this class |
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class Rectangle2D |
|---|
Rectangle2D.Double, Rectangle2D.Float |
| Field Summary |
|---|
| Fields inherited from class Rectangle2D.Double |
|---|
height, width, x, y |
| Fields inherited from class Rectangle2D |
|---|
OUT_BOTTOM, OUT_LEFT, OUT_RIGHT, OUT_TOP |
| Constructor Summary | |
|---|---|
Envelope2D()
Deprecated. Constructs an initially empty envelope with no CRS. |
|
Envelope2D(CoordinateReferenceSystem crs,
double x,
double y,
double width,
double height)
Deprecated. Constructs two-dimensional envelope defined by the specified coordinates. |
|
Envelope2D(CoordinateReferenceSystem crs,
Rectangle2D rect)
Deprecated. Constructs two-dimensional envelope defined by an other Rectangle2D. |
|
Envelope2D(DirectPosition lower,
DirectPosition upper)
Deprecated. Constructs two-dimensional envelope defined by the specified coordinates. |
|
Envelope2D(Envelope envelope)
Deprecated. Constructs two-dimensional envelope defined by an other Envelope. |
|
Envelope2D(GeographicBoundingBox box)
Deprecated. Constructs a new envelope with the same data than the specified geographic bounding box. |
|
| Method Summary | |
|---|---|
Envelope2D |
createIntersection(Rectangle2D rect)
Deprecated. Returns the intersection of this envelope with the specified rectangle. |
Envelope2D |
createUnion(Rectangle2D rect)
Deprecated. Returns the union of this envelope with the specified rectangle. |
DirectPosition2D |
getLowerCorner()
Deprecated. A coordinate position consisting of all the starting ordinates for each dimension for all points within the Envelope. |
DirectPosition2D |
getUpperCorner()
Deprecated. A coordinate position consisting of all the ending ordinates for each dimension for all points within the Envelope. |
void |
setEnvelope(Envelope envelope)
Deprecated. Sets this envelope to the same values than the given Envelope. |
| Methods inherited from class Envelope2D |
|---|
add, add, boundsEquals, contains, contains, contains, equals, getCenterX, getCenterY, getCoordinateReferenceSystem, getDimension, getHeight, getMaximum, getMaxX, getMaxY, getMedian, getMinimum, getMinX, getMinY, getSpan, getWidth, intersects, intersects, isEmpty, setCoordinateReferenceSystem, toString |
| Methods inherited from class Rectangle2D.Double |
|---|
getBounds2D, getX, getY, outcode, setRect, setRect |
| Methods inherited from class Rectangle2D |
|---|
add, getPathIterator, getPathIterator, hashCode, intersect, intersectsLine, intersectsLine, outcode, setFrame, union |
| Methods inherited from class RectangularShape |
|---|
clone, contains, getBounds, getFrame, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal |
| Methods inherited from class Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface Cloneable |
|---|
clone |
| Constructor Detail |
|---|
public Envelope2D()
public Envelope2D(Envelope envelope)
throws MismatchedDimensionException
Envelope.
envelope - The envelope to copy.
MismatchedDimensionException - If the given envelope is not two-dimensional.GeneralEnvelope.GeneralEnvelope(Envelope)public Envelope2D(GeographicBoundingBox box)
box - The bounding box to copy.GeneralEnvelope.GeneralEnvelope(GeographicBoundingBox)
public Envelope2D(CoordinateReferenceSystem crs,
Rectangle2D rect)
Rectangle2D.
If the given rectangle has negative width or height, they will be interpreted
as envelope spanning the anti-meridian.
crs - The coordinate reference system, or null.rect - The rectangle to copy.GeneralEnvelope.GeneralEnvelope(Rectangle2D)
public Envelope2D(CoordinateReferenceSystem crs,
double x,
double y,
double width,
double height)
crs - The coordinate reference system, or null.x - The x minimal value.y - The y minimal value.width - The envelope width. May be negative for envelope spanning the anti-meridian.height - The envelope height. May be negative for envelope spanning the anti-meridian.
public Envelope2D(DirectPosition lower,
DirectPosition upper)
throws MismatchedReferenceSystemException
Spanning the anti-meridian of a Geographic CRS
This minDP and maxDP arguments may not be really minimal or maximal values
if the rectangle cross the anti-meridian. The given arguments are rather the values to be
returned by getLowerCorner() and getUpperCorner() methods, which may
have an extended interpretation. See the javadoc of above-cited methods for more details.
lower - The fist position.upper - The second position.
MismatchedReferenceSystemException - if the two positions don't use the same CRS.GeneralEnvelope.GeneralEnvelope(GeneralDirectPosition, GeneralDirectPosition)| Method Detail |
|---|
public void setEnvelope(Envelope envelope)
throws MismatchedDimensionException
Envelope.
envelope - The envelope to copy.
MismatchedDimensionException - If the given envelope is not two-dimensional.public DirectPosition2D getLowerCorner()
Envelope.
Note:
The Web Coverage Service (WCS) 1.1 specification uses an extended
interpretation of the bounding box definition. In a WCS 1.1 data structure, the lower
corner defines the edges region in the directions of decreasing coordinate
values in the envelope CRS. This is usually the algebraic minimum coordinates, but not
always. For example, an envelope spanning the anti-meridian could have a lower corner
longitude greater than the upper corner longitude. Such extended interpretation applies
mostly to axes having WRAPAROUND range meaning.
getLowerCorner in interface EnvelopegetLowerCorner in class Envelope2Dpublic DirectPosition2D getUpperCorner()
Envelope.
Note:
The Web Coverage Service (WCS) 1.1 specification uses an extended
interpretation of the bounding box definition. In a WCS 1.1 data structure, the upper
corner defines the edges region in the directions of increasing coordinate
values in the envelope CRS. This is usually the algebraic maximum coordinates, but not
always. For example, an envelope spanning the anti-meridian could have an upper corner
longitude less than the lower corner longitude. Such extended interpretation applies
mostly to axes having WRAPAROUND range meaning.
getUpperCorner in interface EnvelopegetUpperCorner in class Envelope2Dpublic Envelope2D createIntersection(Rectangle2D rect)
NaN values, then this
method returns an empty envelope.
Spanning the anti-meridian of a Geographic CRS
This method supports anti-meridian spanning in the same way than
GeneralEnvelope.intersect(Envelope).
createIntersection in class Envelope2Drect - The rectangle to be intersected with this envelope.
public Envelope2D createUnion(Rectangle2D rect)
Envelope2D.add(Rectangle2D).
createUnion in class Envelope2Drect - The rectangle to add to this envelope.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||