org.deegree_impl.model.geometry
Class GM_SurfaceBoundary_Impl

java.lang.Object
  extended byorg.deegree_impl.model.geometry.GM_Object_Impl
      extended byorg.deegree_impl.model.geometry.GM_Boundary_Impl
          extended byorg.deegree_impl.model.geometry.GM_PrimitiveBoundary_Impl
              extended byorg.deegree_impl.model.geometry.GM_SurfaceBoundary_Impl
All Implemented Interfaces:
GM_Boundary, GM_Object, GM_PrimitiveBoundary, GM_SurfaceBoundary, java.io.Serializable

class GM_SurfaceBoundary_Impl
extends GM_PrimitiveBoundary_Impl
implements GM_SurfaceBoundary, java.io.Serializable

default implementation of the GM_SurfaceBoundary interface. ------------------------------------------------------------

Version:
11.6.2001
Author:
Andreas Poth href="mailto:poth@lat-lon.de"

Field Summary
 GM_Ring exterior
           
 GM_Ring[] interior
           
private static long serialVersionUID
          Use serialVersionUID for interoperability.
 
Fields inherited from class org.deegree_impl.model.geometry.GM_Object_Impl
boundary, centroid, convexHull, crs, empty, envelope, mute, valid
 
Constructor Summary
GM_SurfaceBoundary_Impl(GM_Ring exterior, GM_Ring[] interior)
          constructor
 
Method Summary
private  void calculateCentroid()
          calculates the centroid of the surface boundary
private  void calculateEnvelope()
          calculates the envelope of the surface boundary
protected  void calculateParam()
          calculates the centroid and the envelope of the surface boundary
 java.lang.Object clone()
          returns a copy of the geometry
 boolean contains(GM_Object gmo)
          The Boolean valued operation "contains" shall return TRUE if this GM_Object contains another GM_Object.
 boolean contains(GM_Position position)
          The Boolean valued operation "contains" shall return TRUE if this GM_Object contains a single point given by a coordinate.
 boolean equals(java.lang.Object other)
          checks if this curve is completly equal to the submitted geometry
 GM_Boundary getBoundary()
          returns the boundary of the boundary
 int getCoordinateDimension()
          The operation "coordinateDimension" shall return the dimension of the coordinates that define this GM_Object, which must be the same as the coordinate dimension of the coordinate reference system for this GM_Object.
 int getDimension()
          The operation "dimension" shall return the inherent dimension of this GM_Object, which shall be less than or equal to the coordinate dimension.
 GM_Ring getExteriorRing()
          gets the exterior ring
 GM_Ring[] getInteriorRings()
          gets the interior ring(s)
 boolean intersects(GM_Object gmo)
          The Boolean valued operation "intersects" shall return TRUE if this GM_Object intersects another GM_Object.
 boolean isCycle()
          A geometric object, which has no boundary is a cycle.
 java.lang.String toString()
           
 
Methods inherited from class org.deegree_impl.model.geometry.GM_Object_Impl
difference, distance, getBuffer, getCentroid, getConvexHull, getCoordinateSystem, getEnvelope, intersection, isEmpty, isValid, isWithinDistance, setCoordinateSystem, setEmpty, setValid, translate, union
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.deegree.model.geometry.GM_Boundary
isCycle
 
Methods inherited from interface org.deegree.model.geometry.GM_Object
difference, distance, getBuffer, getCentroid, getConvexHull, getCoordinateSystem, getEnvelope, intersection, isEmpty, isWithinDistance, translate, union
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Use serialVersionUID for interoperability.

See Also:
Constant Field Values

exterior

public GM_Ring exterior

interior

public GM_Ring[] interior
Constructor Detail

GM_SurfaceBoundary_Impl

public GM_SurfaceBoundary_Impl(GM_Ring exterior,
                               GM_Ring[] interior)
                        throws GM_Exception
constructor

Method Detail

getExteriorRing

public GM_Ring getExteriorRing()
gets the exterior ring

Specified by:
getExteriorRing in interface GM_SurfaceBoundary

getInteriorRings

public GM_Ring[] getInteriorRings()
gets the interior ring(s)

Specified by:
getInteriorRings in interface GM_SurfaceBoundary

getBoundary

public GM_Boundary getBoundary()
returns the boundary of the boundary

Specified by:
getBoundary in interface GM_Object
Overrides:
getBoundary in class GM_Object_Impl

equals

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

Overrides:
equals in class GM_Object_Impl
Parameters:
other - object to compare to
Returns:
true if the objects are equal, else false

getDimension

public int getDimension()
The operation "dimension" shall return the inherent dimension of this GM_Object, which shall be less than or equal to the coordinate dimension. The dimension of a collection of geometric objects shall be the largest dimension of any of its pieces. Points are 0-dimensional, curves are 1-dimensional, surfaces are 2-dimensional, and solids are 3-dimensional.

Specified by:
getDimension in interface GM_Object

getCoordinateDimension

public int getCoordinateDimension()
The operation "coordinateDimension" shall return the dimension of the coordinates that define this GM_Object, which must be the same as the coordinate dimension of the coordinate reference system for this GM_Object.

Specified by:
getCoordinateDimension in interface GM_Object

clone

public java.lang.Object clone()
returns a copy of the geometry

Overrides:
clone in class GM_Object_Impl

intersects

public boolean intersects(GM_Object gmo)
The Boolean valued operation "intersects" shall return TRUE if this GM_Object intersects another GM_Object. Within a GM_Complex, the GM_Primitives do not intersect one another. In general, topologically structured data uses shared geometric objects to capture intersection information.

Specified by:
intersects in interface GM_Object
Overrides:
intersects in class GM_Object_Impl
Parameters:
gmo - the GM_Object to intersect with
Returns:
true if the objects intersects, else false

contains

public boolean contains(GM_Object gmo)
The Boolean valued operation "contains" shall return TRUE if this GM_Object contains another GM_Object.

At the moment the operation just works with point geometries

Specified by:
contains in interface GM_Object
Overrides:
contains in class GM_Object_Impl
Parameters:
gmo - the GM_Object to test (whether is is contained)
Returns:
true if the given object is contained, else false

contains

public boolean contains(GM_Position position)
The Boolean valued operation "contains" shall return TRUE if this GM_Object contains a single point given by a coordinate.

dummy implementation

Specified by:
contains in interface GM_Object
Overrides:
contains in class GM_Object_Impl
Parameters:
position - GM_Position to test (whether is is contained)
Returns:
true if the given object is contained, else false

calculateEnvelope

private void calculateEnvelope()
calculates the envelope of the surface boundary


calculateCentroid

private void calculateCentroid()
calculates the centroid of the surface boundary


calculateParam

protected void calculateParam()
calculates the centroid and the envelope of the surface boundary

Specified by:
calculateParam in class GM_Object_Impl

toString

public java.lang.String toString()
Overrides:
toString in class GM_Object_Impl
Returns:

isCycle

public boolean isCycle()
A geometric object, which has no boundary is a cycle.

Specified by:
isCycle in interface GM_Boundary