deegree 2.2 (2008/12/22 11:33 build-3038-official)

org.deegree.model.spatialschema
Class CurveSegmentImpl

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

abstract class CurveSegmentImpl
extends Object
implements CurveSegment, Serializable

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

Author:
Andreas Poth, last edited by: $Author: apoth $

Field Summary
protected  CoordinateSystem crs
           
protected  Position[] points
           
 
Constructor Summary
protected CurveSegmentImpl(Position[] gmps, CoordinateSystem crs)
          Creates a new CurveSegmentImpl object.
 
Method Summary
 boolean contains(Geometry gmo)
          The Boolean valued operation "contains" shall return TRUE if this Geometry contains another Geometry.
 boolean equals(Object other)
          checks if this curve segment is completly 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
 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.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

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

getNumberOfPoints

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

Specified by:
getNumberOfPoints in interface CurveSegment

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

getPositionAt

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

Specified by:
getPositionAt in interface CurveSegment

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

equals

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

Overrides:
equals in class 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

toString

public String toString()
Overrides:
toString in class Object
Returns:
string representation

deegree 2.2 (2008/12/22 11:33 build-3038-official)

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