oracle.sdoapi.geom
Interface Envelope

All Superinterfaces:
java.lang.Cloneable, java.io.Serializable
All Known Implementing Classes:
EnvelopeImpl

public interface Envelope
extends java.lang.Cloneable, java.io.Serializable

Envelope is a helper interface that represents an OGC-specified envelope, which is usually an aligned Minimum Bounding Rectangle of a geometry object.


Method Summary
 java.lang.Object clone()
          Clones this envelope to generate another envelope object.
 boolean contains(CoordPoint point)
          Determines if this envelope object (MBR) contains the input coordinate point.
 boolean contains(double x, double y)
          Determines if this envelope object (MBR) contains the input (x, y) coordinate.
 boolean contains(Envelope envelope)
          Determines if this envelope object (MBR) contains the input envelope.
 Envelope expand(CoordPoint point)
          Expands this envelope object (MBR) to contain the input coordinate point.
 Envelope expand(double x, double y)
          Expands this envelope object (MBR) to contain the input coordinates.
 Envelope expand(Envelope envelope)
          Expands this envelope object (MBR) to contain the input envelope.
 Envelope expandBy(double w, double h)
          Expands this envelope by w amount in X-axis (w/2 on each side); also expands by h amount in Y-axis (h/2 on each side).
 double getHeight()
          Gets the height of this envelope (MBR).
 CoordPoint getLowerLeft()
          Gets the lower-left coordinate point.
 void getLowerLeft(CoordPoint point)
          Gets the lower-left coordinate point.
 double getMaxOrd(int i)
          Gets the i-th ordinate of upper-right corner.
 double getMaxX()
          Gets the x coordinate of upper-right corner.
 double getMaxY()
          Gets the y coordinate of upper-right corner.
 double getMinOrd(int i)
          Gets the i-th ordinate of lower-left corner.
 double getMinX()
          Gets the x coordinate of lower-left corner.
 double getMinY()
          Gets the y coordinate of lower-left corner.
 CoordPoint getUpperRight()
          Gets the upper-right coordinate point.
 void getUpperRight(CoordPoint point)
          Gets the upper-right coordinate point.
 double getWidth()
          Gets the width of this envelope (MBR).
 boolean isEmpty()
          Determines if this envelope (MBR) is empty, that is, if the lower-left corner has x, y coordinates greater than the x, y coordinates of the upper-right corner, respectively.
 boolean overlaps(Envelope envelope)
          Determines if two envelopes (MBRs) overlap each other.
 

Method Detail

getMinX

public double getMinX()
Gets the x coordinate of lower-left corner.
Returns:
the x coordinate of lower-left corner

getMinY

public double getMinY()
Gets the y coordinate of lower-left corner.
Returns:
the y coordinate of lower-left corner

getMinOrd

public double getMinOrd(int i)
Gets the i-th ordinate of lower-left corner.
Parameters:
i - the 0-based index of the ordinates. For example, i = 0 means the first dimension (or x by convention), etc.
Returns:
the i-th ordinate of lower-left corner, or Double.NaN if the i-th ordinate is not available

getMaxX

public double getMaxX()
Gets the x coordinate of upper-right corner.
Returns:
the x coordinate of upper-right corner

getMaxY

public double getMaxY()
Gets the y coordinate of upper-right corner.
Returns:
the y coordinate of upper-right corner

getMaxOrd

public double getMaxOrd(int i)
Gets the i-th ordinate of upper-right corner.
Parameters:
i - the 0-based index of the ordinates. For example, i = 0 means the first dimension (or x by convention), etc.
Returns:
the i-th ordinate of upper-right corner, or Double.NaN if the i-th ordinate is not available

getLowerLeft

public CoordPoint getLowerLeft()
Gets the lower-left coordinate point.
Returns:
the lower-left coordinate point

getLowerLeft

public void getLowerLeft(CoordPoint point)
Gets the lower-left coordinate point. This method may be more memory efficient when you can reuse the coordinate point object.
Parameters:
point - a preallocated coordinate point that is to be filled with the ordinates of the lower-left coordinate point.

getUpperRight

public CoordPoint getUpperRight()
Gets the upper-right coordinate point.
Returns:
the upper-right coordinate point

getUpperRight

public void getUpperRight(CoordPoint point)
Gets the upper-right coordinate point. This method may be more memory efficient when you can reuse the coordinate point object.
Parameters:
point - a preallocated coordinate point that is to be filled with the ordinates of the upper-right coordinate point.

isEmpty

public boolean isEmpty()
Determines if this envelope (MBR) is empty, that is, if the lower-left corner has x, y coordinates greater than the x, y coordinates of the upper-right corner, respectively.
Returns:
true if this envelope is valid; false otherwise

getWidth

public double getWidth()
Gets the width of this envelope (MBR).
Returns:
the width of this envelope

getHeight

public double getHeight()
Gets the height of this envelope (MBR).
Returns:
the height of this envelope

contains

public boolean contains(CoordPoint point)
Determines if this envelope object (MBR) contains the input coordinate point.
Parameters:
point - the coordinate point to test containment against
Returns:
true if this envelope contains the input point; false otherwise

contains

public boolean contains(double x,
                        double y)
Determines if this envelope object (MBR) contains the input (x, y) coordinate.
Parameters:
x - the x coordinate of the point to test containment against
y - the y coordinate of the point to test containment against
Returns:
true if this envelope contains the input coordinate; false otherwise

contains

public boolean contains(Envelope envelope)
Determines if this envelope object (MBR) contains the input envelope.
Parameters:
envelope - the envelope to test containment against
Returns:
true if this envelope contains the input envelope; false otherwise

overlaps

public boolean overlaps(Envelope envelope)
Determines if two envelopes (MBRs) overlap each other.
Parameters:
envelope - the envelope to test against
Returns:
true if this envelope overlaps with the input envelope; false otherwise

expand

public Envelope expand(CoordPoint point)
Expands this envelope object (MBR) to contain the input coordinate point.
Parameters:
point - the coordinate point to expand this envelope
Returns:
this expanded envelope

expand

public Envelope expand(double x,
                       double y)
Expands this envelope object (MBR) to contain the input coordinates.
Parameters:
x - the x coordinate of the point to expand this envelope
y - the y coordinate of the point to expand this envelope
Returns:
this expanded envelope

expand

public Envelope expand(Envelope envelope)
Expands this envelope object (MBR) to contain the input envelope.
Parameters:
envelope - the envelope to expand this envelope
Returns:
this expanded envelope

expandBy

public Envelope expandBy(double w,
                         double h)
Expands this envelope by w amount in X-axis (w/2 on each side); also expands by h amount in Y-axis (h/2 on each side).

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Clones this envelope to generate another envelope object.
Overrides:
clone in class java.lang.Object
Returns:
a envelope object with the same content as in this envelope