org.geotools.geometry.jts.spatialschema.geometry.primitive
Class CurveImpl

java.lang.Object
  extended by org.geotools.geometry.jts.spatialschema.geometry.GeometryImpl
      extended by org.geotools.geometry.jts.spatialschema.geometry.primitive.CurveImpl
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, JTSGeometry, org.opengis.geometry.coordinate.GenericCurve, org.opengis.geometry.Geometry, org.opengis.geometry.primitive.Curve, org.opengis.geometry.primitive.OrientableCurve, org.opengis.geometry.primitive.OrientablePrimitive, org.opengis.geometry.primitive.Primitive, org.opengis.geometry.TransfiniteSet

public class CurveImpl
extends GeometryImpl
implements org.opengis.geometry.primitive.Curve

Simple implementation of the Curve interface that does not implement any of the (hard) math functions like intersection, etc. A curve consists of any number of CurveSegment objects (such as LineStrings) that must be connected end-to-end.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.geotools.geometry.jts.spatialschema.geometry.GeometryImpl
GeometryImpl.MathTransformFilter
 
Constructor Summary
CurveImpl()
          Creates a new CurveImpl.
CurveImpl(org.opengis.referencing.crs.CoordinateReferenceSystem crs)
          Creates a new CurveImpl.
 
Method Summary
 org.opengis.geometry.coordinate.LineString asLineString(double maxSpacing, double maxOffset)
          Not fully implemented.
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()
          Returns the boundary of this geometry.
 java.util.Set getComplexes()
          Not implemented (and probably never will be since traversal of this association would require a lot of extra work).
 org.opengis.geometry.complex.CompositeCurve getComposite()
          Returns null.
 java.util.Set getContainedPrimitives()
          Not implemented.
 java.util.Set getContainingPrimitives()
          Not implemented (and probably never will be since traversal of this association would require a lot of extra work).
 double getEndConstructiveParam()
           
 double getEndParam()
           
 org.opengis.geometry.DirectPosition getEndPoint()
           
 int getOrientation()
           
 org.opengis.geometry.coordinate.ParamForPoint getParamForPoint(org.opengis.geometry.DirectPosition p)
          Not implemented.
 org.opengis.geometry.primitive.Curve getPrimitive()
          Returns "this".
 org.opengis.geometry.primitive.OrientableCurve[] getProxy()
          Not implemented.
 java.util.List<org.opengis.geometry.primitive.CurveSegment> getSegments()
           
 double getStartConstructiveParam()
           
 double getStartParam()
           
 org.opengis.geometry.DirectPosition getStartPoint()
           
 double[] getTangent(double s)
           
 double length(double cparam1, double cparam2)
          Not implemented.
 double length(org.opengis.geometry.coordinate.Position point1, org.opengis.geometry.coordinate.Position point2)
          Not implemented.
 
Methods inherited from class org.geotools.geometry.jts.spatialschema.geometry.GeometryImpl
clone, contains, contains, difference, distance, equals, getBuffer, getCentroid, getClosure, getConvexHull, getCoordinateDimension, getCoordinateReferenceSystem, getDimension, getDistance, getEnvelope, getJTSGeometry, getMaximalComplex, getMbRegion, getPrecision, getRepresentativePoint, intersection, intersects, invalidateCachedJTSPeer, isCycle, isMutable, isSimple, listAsSet, setJTSPeer, setParent, symmetricDifference, toImmutable, transform, transform, union
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.opengis.geometry.Geometry
clone, distance, getBuffer, getCentroid, getClosure, getConvexHull, getCoordinateDimension, getCoordinateReferenceSystem, getDimension, getEnvelope, getMaximalComplex, getMbRegion, getPrecision, getRepresentativePoint, isCycle, isMutable, isSimple, toImmutable, transform, transform
 
Methods inherited from interface org.opengis.geometry.TransfiniteSet
contains, contains, difference, equals, intersection, intersects, symmetricDifference, union
 

Constructor Detail

CurveImpl

public CurveImpl()
Creates a new CurveImpl.


CurveImpl

public CurveImpl(org.opengis.referencing.crs.CoordinateReferenceSystem crs)
Creates a new CurveImpl.

Parameters:
crs -
Method Detail

getBoundary

public org.opengis.geometry.primitive.CurveBoundary getBoundary()
Description copied from class: GeometryImpl
Returns the boundary of this geometry. Returns null if the boundary is empty.

Specified by:
getBoundary in interface org.opengis.geometry.Geometry
Specified by:
getBoundary in interface org.opengis.geometry.primitive.OrientableCurve
Specified by:
getBoundary in interface org.opengis.geometry.primitive.Primitive
Overrides:
getBoundary in class GeometryImpl

getSegments

public final java.util.List<org.opengis.geometry.primitive.CurveSegment> getSegments()
Specified by:
getSegments in interface org.opengis.geometry.primitive.Curve
See Also:
Curve.getSegments()

getStartPoint

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

getEndPoint

public final 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 final double getStartParam()
Specified by:
getStartParam in interface org.opengis.geometry.coordinate.GenericCurve

getEndParam

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

getStartConstructiveParam

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

getEndConstructiveParam

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

forConstructiveParam

public final org.opengis.geometry.DirectPosition forConstructiveParam(double cp)
Specified by:
forConstructiveParam in interface org.opengis.geometry.coordinate.GenericCurve

forParam

public final org.opengis.geometry.DirectPosition forParam(double s)
Specified by:
forParam in interface org.opengis.geometry.coordinate.GenericCurve

getParamForPoint

public org.opengis.geometry.coordinate.ParamForPoint getParamForPoint(org.opengis.geometry.DirectPosition p)
Not implemented. Always just returns null.

Specified by:
getParamForPoint in interface org.opengis.geometry.coordinate.GenericCurve

length

public double length(org.opengis.geometry.coordinate.Position point1,
                     org.opengis.geometry.coordinate.Position point2)
Not implemented. Always returns zero.

Specified by:
length in interface org.opengis.geometry.coordinate.GenericCurve

length

public double length(double cparam1,
                     double cparam2)
Not implemented. Always returns 0. This wouldn't be hard to implement, though. You'd just sum over the CurveSegments that comprise this object.

Specified by:
length in interface org.opengis.geometry.coordinate.GenericCurve

asLineString

public org.opengis.geometry.coordinate.LineString asLineString(double maxSpacing,
                                                               double maxOffset)
Not fully implemented. Returns null, unless all CurveSegments are LineStrings, in which case it returns a concatenation of all the LineStrings. In future versions this could be implemented by delegating to the comprising segments.

Specified by:
asLineString in interface org.opengis.geometry.coordinate.GenericCurve

getComposite

public org.opengis.geometry.complex.CompositeCurve getComposite()
Returns null.

Specified by:
getComposite in interface org.opengis.geometry.primitive.OrientableCurve
Specified by:
getComposite in interface org.opengis.geometry.primitive.Primitive

getOrientation

public int getOrientation()
Specified by:
getOrientation in interface org.opengis.geometry.primitive.OrientablePrimitive

getPrimitive

public org.opengis.geometry.primitive.Curve getPrimitive()
Returns "this". Should return the containing primitive, if any.

Specified by:
getPrimitive in interface org.opengis.geometry.primitive.OrientableCurve
Specified by:
getPrimitive in interface org.opengis.geometry.primitive.OrientablePrimitive

getContainedPrimitives

public java.util.Set getContainedPrimitives()
Not implemented. Always returns an empty set.

Specified by:
getContainedPrimitives in interface org.opengis.geometry.primitive.Primitive

getContainingPrimitives

public java.util.Set getContainingPrimitives()
Not implemented (and probably never will be since traversal of this association would require a lot of extra work). Always returns an empty set.

Specified by:
getContainingPrimitives in interface org.opengis.geometry.primitive.Primitive

getComplexes

public java.util.Set getComplexes()
Not implemented (and probably never will be since traversal of this association would require a lot of extra work). Always returns an empty set.

Specified by:
getComplexes in interface org.opengis.geometry.primitive.Primitive

getProxy

public org.opengis.geometry.primitive.OrientableCurve[] getProxy()
Not implemented. Returns null.

Specified by:
getProxy in interface org.opengis.geometry.primitive.Curve
Specified by:
getProxy in interface org.opengis.geometry.primitive.Primitive

computeJTSPeer

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

Specified by:
computeJTSPeer in class GeometryImpl


Copyright © 1996-2010 Geotools. All Rights Reserved.