org.deegree_impl.model.geometry
Class GM_Envelope_Impl

java.lang.Object
  extended byorg.deegree_impl.model.geometry.GM_Envelope_Impl
All Implemented Interfaces:
GM_Envelope, java.io.Serializable
Direct Known Subclasses:
LayerBoundingBox_Impl

public class GM_Envelope_Impl
extends java.lang.Object
implements GM_Envelope, java.io.Serializable

a boundingbox as child of a GM_Polygon isn't part of the iso19107 spec but it simplifies the geometry handling within jago

------------------------------------------------------------

Version:
$Id: GM_Envelope_Impl.java,v 1.13 2004/03/02 07:38:14 poth Exp $
Author:
Andreas Poth href="mailto:poth@lat-lon.de", Markus Bedel href="mailto:bedel@giub.uni-bonn.de"
See Also:
Serialized Form

Field Summary
private  GM_Position max
           
private  GM_Position min
           
private static long serialVersionUID
          Use serialVersionUID for interoperability.
 
Constructor Summary
GM_Envelope_Impl()
          Creates a new GM_Envelope_Impl object.
GM_Envelope_Impl(GM_Position min, GM_Position max)
          Creates a new GM_Envelope_Impl object.
 
Method Summary
 java.lang.Object clone()
           
 boolean contains(GM_Envelope bb)
          returns true if all points of the submitted bounding box are within this bounding box
 boolean contains(GM_Position point)
          returns true if the bounding box conatins the specified GM_Point
 GM_Envelope createIntersection(GM_Envelope bb)
          returns a new GM_Envelope object representing the intersection of this GM_Envelope with the specified GM_Envelope. * Note: If there is no intersection at all GM_Envelope will be null.
 boolean equals(java.lang.Object other)
          checks if this point is completly equal to the submitted geometry
 GM_Envelope getBuffer(double b)
          creates a new envelope
 double getHeight()
          returns the height of bounding box
 GM_Position getMax()
          returns the maximum coordinates of bounding box
 GM_Position getMin()
          returns the minimum coordinates of bounding box
 double getWidth()
          returns the width of bounding box
 boolean intersects(GM_Envelope bb)
          returns true if this envelope and the submitted intersects
 GM_Envelope merge(GM_Envelope envelope)
          merges two GM_Envelops and returns the minimum envelope containing both.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Use serialVersionUID for interoperability.

See Also:
Constant Field Values

max

private GM_Position max

min

private GM_Position min
Constructor Detail

GM_Envelope_Impl

public GM_Envelope_Impl()
Creates a new GM_Envelope_Impl object.


GM_Envelope_Impl

public GM_Envelope_Impl(GM_Position min,
                        GM_Position max)
Creates a new GM_Envelope_Impl object.

Parameters:
min -
max -
Method Detail

clone

public java.lang.Object clone()
Returns:

getMin

public GM_Position getMin()
returns the minimum coordinates of bounding box

Specified by:
getMin in interface GM_Envelope

getMax

public GM_Position getMax()
returns the maximum coordinates of bounding box

Specified by:
getMax in interface GM_Envelope

getWidth

public double getWidth()
returns the width of bounding box

Specified by:
getWidth in interface GM_Envelope

getHeight

public double getHeight()
returns the height of bounding box

Specified by:
getHeight in interface GM_Envelope

contains

public boolean contains(GM_Position point)
returns true if the bounding box conatins the specified GM_Point

Specified by:
contains in interface GM_Envelope

intersects

public boolean intersects(GM_Envelope bb)
returns true if this envelope and the submitted intersects

Specified by:
intersects in interface GM_Envelope

contains

public boolean contains(GM_Envelope bb)
returns true if all points of the submitted bounding box are within this bounding box

Specified by:
contains in interface GM_Envelope

createIntersection

public GM_Envelope createIntersection(GM_Envelope bb)
returns a new GM_Envelope object representing the intersection of this GM_Envelope with the specified GM_Envelope. * Note: If there is no intersection at all GM_Envelope will be null.

Specified by:
createIntersection in interface GM_Envelope
Parameters:
bb - the GM_Envelope to be intersected with this GM_Envelope
Returns:
the largest GM_Envelope contained in both the specified GM_Envelope and in this GM_Envelope.

equals

public boolean equals(java.lang.Object other)
checks if this point is completly equal to the submitted geometry


getBuffer

public GM_Envelope getBuffer(double b)
Description copied from interface: GM_Envelope
creates a new envelope

Specified by:
getBuffer in interface GM_Envelope
Parameters:
b -
Returns:

merge

public GM_Envelope merge(GM_Envelope envelope)
Description copied from interface: GM_Envelope
merges two GM_Envelops and returns the minimum envelope containing both.

Specified by:
merge in interface GM_Envelope
Returns:
See Also:
GM_Envelope.merge(org.deegree.model.geometry.GM_Envelope)

toString

public java.lang.String toString()
Returns: