org.deegree_impl.model.geometry
Class GM_CurveBoundary_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_CurveBoundary_Impl
All Implemented Interfaces:
GM_Boundary, GM_CurveBoundary, GM_Object, GM_PrimitiveBoundary, java.io.Serializable

class GM_CurveBoundary_Impl
extends GM_PrimitiveBoundary_Impl
implements GM_CurveBoundary, java.io.Serializable

default implementation of the GM_CurveBoundary interface from package jago.model.

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

Version:
10.6.2001
Author:
Andreas Poth

Field Summary
private  GM_Position ep
           
private static long serialVersionUID
          Use serialVersionUID for interoperability.
private  GM_Position sp
           
 
Fields inherited from class org.deegree_impl.model.geometry.GM_Object_Impl
boundary, centroid, convexHull, crs, empty, envelope, mute, valid
 
Constructor Summary
GM_CurveBoundary_Impl(CS_CoordinateSystem crs, GM_Position sp, GM_Position ep)
          constructor of curve_boundary with CS_CoordinateSystem and startpoint and endpoint
 
Method Summary
private  void calculateEnvelope()
          calculates the envelope of the curve boundary
protected  void calculateParam()
          calculates the envelope of the curve boundary
 java.lang.Object clone()
          returns a shallow copy of the geometry
 boolean equals(java.lang.Object other)
          checks if this curve is completly equal to the submitted geometry
 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_Position getEndPoint()
          returns the EndPoint of the boundary
 GM_Position getStartPoint()
          returns the StartPoint of the boundary
 boolean intersects(GM_Object gmo)
          The Boolean valued operation "intersects" shall return TRUE if this GM_Object intersects another GM_Object.
private  boolean intersectsMultiPrimitive(GM_MultiPrimitive mprim)
          the operations returns true if the submitted multi primitive intersects with the curve segment
 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
contains, contains, difference, distance, getBoundary, 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
contains, contains, difference, distance, getBoundary, 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

ep

private GM_Position ep

sp

private GM_Position sp
Constructor Detail

GM_CurveBoundary_Impl

public GM_CurveBoundary_Impl(CS_CoordinateSystem crs,
                             GM_Position sp,
                             GM_Position ep)
                      throws GM_Exception
constructor of curve_boundary with CS_CoordinateSystem and startpoint and endpoint

Method Detail

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 shallow copy of the geometry

Overrides:
clone in class GM_Object_Impl

getStartPoint

public GM_Position getStartPoint()
returns the StartPoint of the boundary

Specified by:
getStartPoint in interface GM_CurveBoundary

getEndPoint

public GM_Position getEndPoint()
returns the EndPoint of the boundary

Specified by:
getEndPoint in interface GM_CurveBoundary

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

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

intersectsMultiPrimitive

private boolean intersectsMultiPrimitive(GM_MultiPrimitive mprim)
                                  throws java.lang.Exception
the operations returns true if the submitted multi primitive intersects with the curve segment

Throws:
java.lang.Exception

calculateEnvelope

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


calculateParam

protected void calculateParam()
calculates the envelope of the curve 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