deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.model.spatialschema
Class CurveSegmentImpl

java.lang.Object
  extended by org.deegree.model.spatialschema.CurveSegmentImpl
All Implemented Interfaces:
java.io.Serializable, CurveSegment, GenericCurve
Direct Known Subclasses:
LineStringImpl

public abstract class CurveSegmentImpl
extends java.lang.Object
implements CurveSegment, java.io.Serializable

default implementation of the CurveSegment interface from package deegree.model.spatialschema. the class is abstract because it should be specialized by derived classes LineString for example

Version:
$Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18 Jun 2009) $
Author:
Andreas Poth, last edited by: $Author: mschneider $
See Also:
Serialized Form

Field Summary
protected  CoordinateSystem crs
           
protected  Position[] points
           
 
Constructor Summary
protected CurveSegmentImpl(Position[] gmps, CoordinateSystem crs)
          Creates a new CurveSegmentImpl object.
 
Method Summary
protected  java.lang.Object clone()
           
 boolean contains(Geometry gmo)
          The Boolean valued operation "contains" shall return TRUE if this Geometry contains another Geometry.
 boolean equals(java.lang.Object other)
          checks if this curve segment is completely equal to the submitted geometry
 CoordinateSystem getCoordinateSystem()
          returns the coordinate system of the curve segment
 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
 Position getPositionAt(int index)
          returns the curve segment position at the submitted index
 Position[] getPositions()
          returns all positions of the segement as array of Position.
 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
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.deegree.model.spatialschema.CurveSegment
intersects
 
Methods inherited from interface org.deegree.model.spatialschema.GenericCurve
getAsLineString, getLength
 

Field Detail

crs

protected CoordinateSystem crs

points

protected Position[] points
Constructor Detail

CurveSegmentImpl

protected CurveSegmentImpl(Position[] gmps,
                           CoordinateSystem crs)
                    throws GeometryException
Creates a new CurveSegmentImpl object.

Parameters:
gmps -
crs -
Throws:
GeometryException
Method Detail

getStartPoint

public 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 GenericCurve
Returns:
the first point of the curve

getEndPoint

public 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 GenericCurve
Returns:
the last point of the curve

getNumberOfPoints

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

Specified by:
getNumberOfPoints in interface CurveSegment
Returns:
the number of points building the curve segment

getPositions

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

Specified by:
getPositions in interface CurveSegment
Returns:
all positions of the segement as array of Point

getPositionAt

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

Specified by:
getPositionAt in interface CurveSegment
Parameters:
index - to get the curve
Returns:
the curve position at the submitted index

reverse

public void reverse()
reverses the direction of the curvesegment

Specified by:
reverse in interface CurveSegment

getCoordinateSystem

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

Specified by:
getCoordinateSystem in interface CurveSegment
Returns:
the coordinate system of the curve segment

equals

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

Overrides:
equals in class java.lang.Object
Parameters:
other - object to compare to

contains

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

Specified by:
contains in interface CurveSegment
Returns:
true if this geometry contains given geometry.

clone

protected java.lang.Object clone()
                          throws java.lang.CloneNotSupportedException
Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException

toString

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

deegree 2.5 (2011/06/29 09:44 build-8-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org