gistoolkit.features
Class Envelope

java.lang.Object
  extended bygistoolkit.features.Envelope
Direct Known Subclasses:
ExtentsM

public class Envelope
extends java.lang.Object

Class to represent a 2 dimensional rectangular area in space.

This class is immutable, and can not be changed after instantiated. To create an envelope that can be changed, create an EnvelopeBuffer from the shapeutils package, and use it for dynamic expansions and contractions of envelopes.


Constructor Summary
Envelope(double inMinX, double inMinY, double inMaxX, double inMaxY)
          Create a new Envelope with the given values.
 
Method Summary
 java.lang.Object clone()
          Create a copy of the envelope.
 boolean contains(double inX, double inY)
          Determines if the point sent in is within the current envelope.
 boolean contains(Envelope inEnvelope)
          Determines if the Extents sent in is within the current Extents.
 double getHeight()
          Returns the height of this envelope
 double getMaxX()
          Returns the maximum X coordinate.
 double getMaxY()
          Returns the maximum Y coordinate.
 double getMinX()
          Returns the minimum X coordinate.
 double getMinY()
          Returns the minimum Y coordinate.
 Envelope getOverlap(Envelope inEnvelope)
          Return the overlap of these two extents, returns null if they do not overap.
 Polygon getPolygon()
          Return the polygon for this Shape.
 double getWidth()
          Returns the width of this envelope
 boolean intersects(Envelope inEnvelope)
          Determines if the Extents sent in overlap the current extents.
 boolean isEqual(Envelope inEnvelope)
          Check if the two envelopes are equal.
 boolean overlaps(Envelope inEnvelope)
          Determines if the Extents sent in is within the current Extents.
 java.lang.String toString()
          The to string method for debugging.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Envelope

public Envelope(double inMinX,
                double inMinY,
                double inMaxX,
                double inMaxY)
Create a new Envelope with the given values. The bottomX is the maximum X, and the Top X is the minimum X.

Method Detail

getMinX

public double getMinX()
Returns the minimum X coordinate.


getMaxX

public double getMaxX()
Returns the maximum X coordinate.


getMinY

public double getMinY()
Returns the minimum Y coordinate.


getMaxY

public double getMaxY()
Returns the maximum Y coordinate.


getWidth

public double getWidth()
Returns the width of this envelope


getHeight

public double getHeight()
Returns the height of this envelope


clone

public java.lang.Object clone()
Create a copy of the envelope.


isEqual

public boolean isEqual(Envelope inEnvelope)
Check if the two envelopes are equal. This is checked against the EqualLimit in Shape.


overlaps

public boolean overlaps(Envelope inEnvelope)
Determines if the Extents sent in is within the current Extents. Compares with equality, such that if the Extents sent in is the same as the current Extents, then the result will be true.


getOverlap

public Envelope getOverlap(Envelope inEnvelope)
Return the overlap of these two extents, returns null if they do not overap. Compares with equality, such that if the Extents sent in is the same as the current Extents, then the result will be true.


intersects

public boolean intersects(Envelope inEnvelope)
Determines if the Extents sent in overlap the current extents. Compares with equality, such that if the Extents sent in shares a partial side with these extents, then it will return true. then the result will be true.


contains

public boolean contains(Envelope inEnvelope)
Determines if the Extents sent in is within the current Extents. Compares with equality, such that if the Extents sent in is the same as the current Extents, then the result will be true.


contains

public boolean contains(double inX,
                        double inY)
Determines if the point sent in is within the current envelope.


getPolygon

public Polygon getPolygon()
Return the polygon for this Shape.


toString

public java.lang.String toString()
The to string method for debugging.