org.geotools.geometry.iso.coordinate
Class CurveSegmentImpl

java.lang.Object
  extended by org.geotools.geometry.iso.coordinate.CurveSegmentImpl
All Implemented Interfaces:
java.io.Serializable, org.opengis.geometry.coordinate.GenericCurve, org.opengis.geometry.primitive.CurveSegment
Direct Known Subclasses:
LineStringImpl

public abstract class CurveSegmentImpl
extends java.lang.Object
implements org.opengis.geometry.primitive.CurveSegment, java.io.Serializable

CurveSegment defines a homogeneous segment of a Curve. Each CurveSegment shall be in, at most, one Curve.

Author:
Jackson Roehrig & Sanjay Jena
See Also:
Serialized Form

Field Summary
protected  double endParam
          The endParam indicates the parameter for the endPoint GenericCurve::endParam() : Distance GenericCurve: {parameterization(startParam()) = startPoint()}; {parameterization(endParam()) = endPoint()}; {length() = endParam() - startParam()} The start and end parameter of a Curve are always 0 and the arc length of the curve respectively.
protected  org.opengis.geometry.primitive.CurveInterpolation interpolation
          The attribute "interpolation" specifies the curve interpolation mechanism used for this segment.
protected  double startParam
          The startParam indicates the parameter for the startPoint GenericCurve::startParam() : Distance GenericCurve: {parameterization(startParam()) = startPoint()}; {parameterization(endParam()) = endPoint()}; {length() = endParam() - startParam()} The start and end parameter of a Curve are always 0 and the arc length of the curve respectively.
 
Constructor Summary
CurveSegmentImpl(CurveSegmentImpl other)
           
CurveSegmentImpl(double startPar)
           
 
Method Summary
 CurveBoundaryImpl getBoundary()
           
 CurveImpl getCurve()
           
 double getEndConstructiveParam()
           
 double getEndParam()
           
abstract  org.opengis.geometry.DirectPosition getEndPoint()
           
abstract  org.opengis.geometry.coordinate.Position getEndPosition()
           
abstract  org.opengis.geometry.Envelope getEnvelope()
          Added to Class requirements of CurveSegments Returns the envelope of the CurveSegment
 org.opengis.geometry.primitive.CurveInterpolation getInterpolation()
           
 double getStartConstructiveParam()
           
 double getStartParam()
           
abstract  org.opengis.geometry.DirectPosition getStartPoint()
          The reverse of a CurveSegment simply reverses the orientation of the parameterizations of the segment.
abstract  org.opengis.geometry.coordinate.Position getStartPosition()
           
 double length()
          GenericCurve: {parameterization(startParam()) = startPoint()}; {parameterization(endParam()) = endPoint()}; {length() = endParam() - startParam()} returns the length => {length() = this.endParam() - this.startParam()} Returns the complete length of the CurveSegment
 double length(double par1, double par2)
           
 double length(org.opengis.geometry.coordinate.Position point0, org.opengis.geometry.coordinate.Position point1)
           
 void setCurve(CurveImpl curve)
          Sets the Curve the Curve Segment belongs to
 void setEndParam(double Value)
          Set the parameter for the endPoint
protected  void setInterpolation(org.opengis.geometry.primitive.CurveInterpolation interpolation)
          Sets the type of interpolation
 void setStartParam(double Value)
           
abstract  void split(double distance)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.opengis.geometry.primitive.CurveSegment
getNumDerivativesAtEnd, getNumDerivativesAtStart, getNumDerivativesInterior, getSamplePoints, reverse
 
Methods inherited from interface org.opengis.geometry.coordinate.GenericCurve
asLineString, forConstructiveParam, forParam, getParamForPoint, getTangent
 

Field Detail

startParam

protected double startParam
The startParam indicates the parameter for the startPoint GenericCurve::startParam() : Distance GenericCurve: {parameterization(startParam()) = startPoint()}; {parameterization(endParam()) = endPoint()}; {length() = endParam() - startParam()} The start and end parameter of a Curve are always 0 and the arc length of the curve respectively. For CurveSegments within a Curve, the start and end parameters of the CurveSegment are equal to those of the Curve where this segment begins and ends in the Segmentation association, so that the startParam of any segment (except the first) is equal to the endParam of the previous segment. If a GenericCurve is used for other purposes, there shall be a restriction that the two parameters must differ by the arc length of the GenericCurve.


endParam

protected double endParam
The endParam indicates the parameter for the endPoint GenericCurve::endParam() : Distance GenericCurve: {parameterization(startParam()) = startPoint()}; {parameterization(endParam()) = endPoint()}; {length() = endParam() - startParam()} The start and end parameter of a Curve are always 0 and the arc length of the curve respectively. For CurveSegments within a Curve, the start and end parameters of the CurveSegment are equal to those of the Curve where this segment begins and ends in the Segmentation association, so that the startParam of any segment (except the first) is equal to the endParam of the previous segment. If a GenericCurve is used for other purposes, there shall be a restriction that the two parameters must differ by the arc length of the GenericCurve.


interpolation

protected org.opengis.geometry.primitive.CurveInterpolation interpolation
The attribute "interpolation" specifies the curve interpolation mechanism used for this segment. This mechanism uses the control points and control parameters to determine the position of this CurveSegment. CurveSegment::interpolation : CurveInterpolation = "linear"

Constructor Detail

CurveSegmentImpl

public CurveSegmentImpl(double startPar)
Parameters:
startPar -

CurveSegmentImpl

public CurveSegmentImpl(CurveSegmentImpl other)
Parameters:
other -
Method Detail

getBoundary

public CurveBoundaryImpl getBoundary()
Specified by:
getBoundary in interface org.opengis.geometry.primitive.CurveSegment

getInterpolation

public org.opengis.geometry.primitive.CurveInterpolation getInterpolation()
Specified by:
getInterpolation in interface org.opengis.geometry.primitive.CurveSegment

setInterpolation

protected void setInterpolation(org.opengis.geometry.primitive.CurveInterpolation interpolation)
Sets the type of interpolation

Parameters:
interpolation -

setCurve

public void setCurve(CurveImpl curve)
Sets the Curve the Curve Segment belongs to

Parameters:
curve -

getCurve

public CurveImpl getCurve()
Specified by:
getCurve in interface org.opengis.geometry.primitive.CurveSegment

getStartPoint

public abstract org.opengis.geometry.DirectPosition getStartPoint()
The reverse of a CurveSegment simply reverses the orientation of the parameterizations of the segment. CurveSegment::reverse() : CurveSegment

Specified by:
getStartPoint in interface org.opengis.geometry.coordinate.GenericCurve
Returns:
DirectPositionImpl

getEndPoint

public abstract org.opengis.geometry.DirectPosition getEndPoint()
Specified by:
getEndPoint in interface org.opengis.geometry.coordinate.GenericCurve

getStartPosition

public abstract org.opengis.geometry.coordinate.Position getStartPosition()
Returns:
start position

getEndPosition

public abstract org.opengis.geometry.coordinate.Position getEndPosition()
Returns:
end position

length

public double length()
GenericCurve: {parameterization(startParam()) = startPoint()}; {parameterization(endParam()) = endPoint()}; {length() = endParam() - startParam()} returns the length => {length() = this.endParam() - this.startParam()} Returns the complete length of the CurveSegment

Returns:
double

getStartParam

public double getStartParam()
Specified by:
getStartParam in interface org.opengis.geometry.coordinate.GenericCurve

setStartParam

public void setStartParam(double Value)
Parameters:
Value -

getEndParam

public double getEndParam()
Specified by:
getEndParam in interface org.opengis.geometry.coordinate.GenericCurve

setEndParam

public void setEndParam(double Value)
Set the parameter for the endPoint

Parameters:
Value -

getStartConstructiveParam

public double getStartConstructiveParam()
Specified by:
getStartConstructiveParam in interface org.opengis.geometry.coordinate.GenericCurve

getEndConstructiveParam

public double getEndConstructiveParam()
Specified by:
getEndConstructiveParam in interface org.opengis.geometry.coordinate.GenericCurve

length

public double length(org.opengis.geometry.coordinate.Position point0,
                     org.opengis.geometry.coordinate.Position point1)
Specified by:
length in interface org.opengis.geometry.coordinate.GenericCurve

length

public double length(double par1,
                     double par2)
Specified by:
length in interface org.opengis.geometry.coordinate.GenericCurve

getEnvelope

public abstract org.opengis.geometry.Envelope getEnvelope()
Added to Class requirements of CurveSegments Returns the envelope of the CurveSegment

Returns:
Envelope of the CurveSegment

split

public abstract void split(double distance)
Parameters:
distance -


Copyright © 1996-2010 Geotools. All Rights Reserved.