org.geotools.geometry.jts.spatialschema.geometry.geometry
Class LineStringImpl

java.lang.Object
  extended by org.geotools.geometry.jts.spatialschema.geometry.geometry.GenericCurveImpl
      extended by org.geotools.geometry.jts.spatialschema.geometry.geometry.LineStringImpl
All Implemented Interfaces:
JTSGeometry, org.opengis.geometry.coordinate.GenericCurve, org.opengis.geometry.coordinate.LineString, org.opengis.geometry.primitive.CurveSegment
Direct Known Subclasses:
LineSegmentImpl

public class LineStringImpl
extends GenericCurveImpl
implements org.opengis.geometry.coordinate.LineString, JTSGeometry

The LineStringImpl class implements the LineString interface.

Version:
$Revision $
Author:
SYS Technologies, crossley

Field Summary
 
Fields inherited from class org.geotools.geometry.jts.spatialschema.geometry.geometry.GenericCurveImpl
parent
 
Constructor Summary
LineStringImpl()
          Creates a new LineStringImpl.
 
Method Summary
 java.util.List asLineSegments()
           
 org.opengis.geometry.coordinate.LineString asLineString(double maxSpacing, double maxOffset)
           
protected  com.vividsolutions.jts.geom.Geometry computeJTSPeer()
          Subclasses must override this method to compute the JTS equivalent of this geometry.
 org.opengis.geometry.DirectPosition forConstructiveParam(double cp)
           
 org.opengis.geometry.DirectPosition forParam(double s)
           
 org.opengis.geometry.primitive.CurveBoundary getBoundary()
           
 org.opengis.geometry.coordinate.PointArray getControlPoints()
           
 org.opengis.geometry.primitive.Curve getCurve()
           
 double getEndConstructiveParam()
           
 double getEndParam()
           
 org.opengis.geometry.DirectPosition getEndPoint()
           
 org.opengis.geometry.primitive.CurveInterpolation getInterpolation()
           
 int getNumDerivativeInterior()
          A line string doesn't have any continuous derivatives since the derivative has dicontinuities at the vertices.
 int getNumDerivativesAtEnd()
           
 int getNumDerivativesAtStart()
           
 int getNumDerivativesInterior()
          We'd like to return "1", but the first derivative is undefined at the corners.
 org.opengis.geometry.coordinate.ParamForPoint getParamForPoint(org.opengis.geometry.DirectPosition p)
           
 org.opengis.geometry.coordinate.PointArray getSamplePoints()
           
 double getStartConstructiveParam()
           
 double getStartParam()
           
 org.opengis.geometry.DirectPosition getStartPoint()
           
 double[] getTangent(double s)
           
 double length(double cparam1, double cparam2)
           
 double length(org.opengis.geometry.coordinate.Position point1, org.opengis.geometry.coordinate.Position point2)
           
 org.opengis.geometry.primitive.CurveSegment reverse()
           
 
Methods inherited from class org.geotools.geometry.jts.spatialschema.geometry.geometry.GenericCurveImpl
getJTSGeometry, invalidateCachedJTSPeer, setJTSPeer, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.geotools.geometry.jts.JTSGeometry
getJTSGeometry, invalidateCachedJTSPeer
 

Constructor Detail

LineStringImpl

public LineStringImpl()
Creates a new LineStringImpl.

Method Detail

getControlPoints

public org.opengis.geometry.coordinate.PointArray getControlPoints()
Specified by:
getControlPoints in interface org.opengis.geometry.coordinate.LineString
See Also:
LineString.getControlPoints()

asLineSegments

public java.util.List asLineSegments()
Specified by:
asLineSegments in interface org.opengis.geometry.coordinate.LineString
See Also:
LineString.asLineSegments()

getBoundary

public org.opengis.geometry.primitive.CurveBoundary getBoundary()
Specified by:
getBoundary in interface org.opengis.geometry.primitive.CurveSegment
See Also:
CurveSegment.getBoundary()

getCurve

public org.opengis.geometry.primitive.Curve getCurve()
Specified by:
getCurve in interface org.opengis.geometry.primitive.CurveSegment
See Also:
CurveSegment.getCurve()

getInterpolation

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

getNumDerivativeInterior

public int getNumDerivativeInterior()
A line string doesn't have any continuous derivatives since the derivative has dicontinuities at the vertices.


getNumDerivativesAtEnd

public int getNumDerivativesAtEnd()
Specified by:
getNumDerivativesAtEnd in interface org.opengis.geometry.primitive.CurveSegment
See Also:
CurveSegment.getNumDerivativesAtEnd()

getNumDerivativesAtStart

public int getNumDerivativesAtStart()
Specified by:
getNumDerivativesAtStart in interface org.opengis.geometry.primitive.CurveSegment
See Also:
CurveSegment.getNumDerivativesAtStart()

getSamplePoints

public org.opengis.geometry.coordinate.PointArray getSamplePoints()
Specified by:
getSamplePoints in interface org.opengis.geometry.primitive.CurveSegment
See Also:
CurveSegment.getSamplePoints()

reverse

public org.opengis.geometry.primitive.CurveSegment reverse()
Specified by:
reverse in interface org.opengis.geometry.primitive.CurveSegment
See Also:
CurveSegment.reverse()

getStartPoint

public org.opengis.geometry.DirectPosition getStartPoint()
Specified by:
getStartPoint in interface org.opengis.geometry.coordinate.GenericCurve
See Also:
GenericCurve.getStartPoint()

getEndPoint

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

getTangent

public double[] getTangent(double s)
Specified by:
getTangent in interface org.opengis.geometry.coordinate.GenericCurve
See Also:
GenericCurve.getTangent(double)

getStartParam

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

getEndParam

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

getStartConstructiveParam

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

getEndConstructiveParam

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

getParamForPoint

public org.opengis.geometry.coordinate.ParamForPoint getParamForPoint(org.opengis.geometry.DirectPosition p)
Specified by:
getParamForPoint in interface org.opengis.geometry.coordinate.GenericCurve
See Also:
org.opengis.geometry.coordinate.GenericCurve#getParamForPoint(org.opengis.geometry.coordinate.DirectPosition)

length

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

length

public double length(double cparam1,
                     double cparam2)
Specified by:
length in interface org.opengis.geometry.coordinate.GenericCurve
See Also:
GenericCurve.length(double, double)

asLineString

public org.opengis.geometry.coordinate.LineString asLineString(double maxSpacing,
                                                               double maxOffset)
Specified by:
asLineString in interface org.opengis.geometry.coordinate.GenericCurve
See Also:
GenericCurve.asLineString(double, double)

computeJTSPeer

protected com.vividsolutions.jts.geom.Geometry computeJTSPeer()
Description copied from class: GenericCurveImpl
Subclasses must override this method to compute the JTS equivalent of this geometry.

Specified by:
computeJTSPeer in class GenericCurveImpl
Returns:
See Also:
com.polexis.lite.spatialschema.geometry.geometry.GenericCurveImpl#computeJTSPeer()

getNumDerivativesInterior

public int getNumDerivativesInterior()
We'd like to return "1", but the first derivative is undefined at the corners. The subclass, LineSegment, can override this to return 1.

Specified by:
getNumDerivativesInterior in interface org.opengis.geometry.primitive.CurveSegment

forConstructiveParam

public org.opengis.geometry.DirectPosition forConstructiveParam(double cp)
Specified by:
forConstructiveParam in interface org.opengis.geometry.coordinate.GenericCurve
Parameters:
cp -
Returns:
See Also:
GenericCurve.forConstructiveParam(double)

forParam

public org.opengis.geometry.DirectPosition forParam(double s)
Specified by:
forParam in interface org.opengis.geometry.coordinate.GenericCurve
Parameters:
s -
Returns:
See Also:
GenericCurve.forParam(double)


Copyright © 1996-2010 Geotools. All Rights Reserved.