org.deegree_impl.model.geometry
Class GM_CurveSegment_Impl

java.lang.Object
  extended byorg.deegree_impl.model.geometry.GM_CurveSegment_Impl
All Implemented Interfaces:
GM_CurveSegment, GM_GenericCurve, java.io.Serializable
Direct Known Subclasses:
GM_LineString_Impl

abstract class GM_CurveSegment_Impl
extends java.lang.Object
implements GM_CurveSegment, java.io.Serializable

default implementation of the GM_CurveSegment interface from package jago.model. the class is abstract because it should be specialized by derived classes GM_LineString for example

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

Version:
10.6.2001
Author:
Andreas Poth

Field Summary
protected  CS_CoordinateSystem crs
           
protected  GM_Position[] points
           
private static long serialVersionUID
          Use serialVersionUID for interoperability.
 
Constructor Summary
protected GM_CurveSegment_Impl(GM_Position[] gmps, CS_CoordinateSystem crs)
          Creates a new GM_CurveSegment_Impl object.
 
Method Summary
 boolean contains(GM_Object gmo)
          The Boolean valued operation "contains" shall return TRUE if this GM_Object contains another GM_Object.
 boolean equals(java.lang.Object other)
          checks if this curve segment is completly equal to the submitted geometry
 CS_CoordinateSystem getCoordinateSystem()
          returns the coordinate system of the curve segment
 GM_Point getEndPoint()
          returns the last point of the curve. if the curve segment doesn't contain a point null will be returned
 int getNumberOfPoints()
          returns the number of points building the curve or curve segment
 GM_Position getPositionAt(int index)
          returns the curve segment position at the submitted index
 GM_Position[] getPositions()
          returns all positions of the segement as array of GM_Position.
 GM_Point getStartPoint()
          returns the first point of the curve. if the curve segment doesn't contain a point null will be returned
 void reverse()
          reverses the direction of the curvesegment
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.deegree.model.geometry.GM_CurveSegment
intersects
 
Methods inherited from interface org.deegree.model.geometry.GM_GenericCurve
getAsLineString, getLength
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Use serialVersionUID for interoperability.

See Also:
Constant Field Values

crs

protected CS_CoordinateSystem crs

points

protected GM_Position[] points
Constructor Detail

GM_CurveSegment_Impl

protected GM_CurveSegment_Impl(GM_Position[] gmps,
                               CS_CoordinateSystem crs)
                        throws GM_Exception
Creates a new GM_CurveSegment_Impl object.

Parameters:
gmps -
crs -
Throws:
GM_Exception
Method Detail

getStartPoint

public GM_Point getStartPoint()
returns the first point of the curve. if the curve segment doesn't contain a point null will be returned

Specified by:
getStartPoint in interface GM_GenericCurve

getEndPoint

public GM_Point getEndPoint()
returns the last point of the curve. if the curve segment doesn't contain a point null will be returned

Specified by:
getEndPoint in interface GM_GenericCurve

getNumberOfPoints

public int getNumberOfPoints()
returns the number of points building the curve or curve segment

Specified by:
getNumberOfPoints in interface GM_CurveSegment

getPositions

public GM_Position[] getPositions()
returns all positions of the segement as array of GM_Position. If the segment is empty null will be returned

Specified by:
getPositions in interface GM_CurveSegment

getPositionAt

public GM_Position getPositionAt(int index)
returns the curve segment position at the submitted index

Specified by:
getPositionAt in interface GM_CurveSegment

reverse

public void reverse()
reverses the direction of the curvesegment

Specified by:
reverse in interface GM_CurveSegment

getCoordinateSystem

public CS_CoordinateSystem getCoordinateSystem()
returns the coordinate system of the curve segment

Specified by:
getCoordinateSystem in interface GM_CurveSegment

equals

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

Parameters:
other - object to compare to

contains

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

Specified by:
contains in interface GM_CurveSegment

toString

public java.lang.String toString()
Returns: