org.geotools.geometry.iso.complex
Class CompositeCurveImpl
Object
GeometryImpl
ComplexImpl
CompositeImpl<OrientableCurveImpl>
CompositeCurveImpl
- All Implemented Interfaces:
- Serializable, Complex, Composite, CompositeCurve, Geometry, OrientableCurve, OrientablePrimitive, Primitive, TransfiniteSet
- Direct Known Subclasses:
- RingImplUnsafe
public class CompositeCurveImpl
- extends CompositeImpl<OrientableCurveImpl>
- implements CompositeCurve
A composite curve, CompositeCurve shall be a Composite with all the geometric
properties of a curve. These properties are instantiated in the operation
"curve". Essentially, a composite curve is a list of orientable curves
(OrientableCurve) agreeing in orientation in a manner such that each curve
(except the first) begins where the previous one ends.
- Author:
- Jackson Roehrig & Sanjay Jena
- See Also:
- Serialized Form
|
Constructor Summary |
CompositeCurveImpl(List<OrientableCurve> generator)
The association role Composition::generator associates this
CompositeCurve to the primitive Curves and OrientableCurves in its
generating set, the curves that form the core of this complex. |
| Methods inherited from class GeometryImpl |
castToGeometryImpl, castToGeometryImpl, contains, contains, cRelate, crosses, difference, disjoint, distance, equals, getBuffer, getCentroid, getClosure, getConvexHull, getCoordinateDimension, getCoordinateReferenceSystem, getDistance, getMbRegion, getPositionFactory, getPrecision, intersection, intersects, isCycle, isMutable, overlaps, relate, symmetricDifference, toImmutable, touches, transform, transform, union, within |
| Methods inherited from interface Complex |
getSubComplexes, getSuperComplexes, isMaximal |
| Methods inherited from interface Geometry |
distance, getBuffer, getCentroid, getClosure, getConvexHull, getCoordinateDimension, getCoordinateReferenceSystem, getMaximalComplex, getMbRegion, getPrecision, isCycle, isMutable, toImmutable, transform, transform |
envelope
protected EnvelopeImpl envelope
CompositeCurveImpl
public CompositeCurveImpl(List<OrientableCurve> generator)
- The association role Composition::generator associates this
CompositeCurve to the primitive Curves and OrientableCurves in its
generating set, the curves that form the core of this complex.
CompositeCurve::generator : Sequence -- the start point
of each orientable curve in the generator is the -- end point of the
previous one CompositeCurve: forAll (1 < j < generator.count - 1)?
generator[j].endPoint = generator[j+1].startPoint;
NOTE To get a full representation of the elements in the Complex, the
Points on the boundary of the generator set of Curve would be added to
the curves in the generator list.
The generator elements will be passed through the super constructor. The
plausibility of the Curves will be checked within the constructor of the
CompositeCurve
Constructs a Composite Curve
- Parameters:
generator -
getElements
public List<Primitive> getElements()
- Description copied from class:
ComplexImpl
- Returns elements contained in this Complex
- Specified by:
getElements in interface Complex- Overrides:
getElements in class ComplexImpl
- Returns:
- the primitives
createBoundary
public Set<Complex> createBoundary()
- Specified by:
createBoundary in class ComplexImpl
- Returns:
- Set
getGeneratorClass
public Class getGeneratorClass()
- Specified by:
getGeneratorClass in class CompositeImpl<OrientableCurveImpl>
- Returns:
- the class
getDimension
public int getDimension(DirectPositionImpl point)
- The method
dimension returns the inherent dimension of
this Object, which is less than or equal to the coordinate dimension. The
dimension of a collection of geometric objects is the largest dimension
of any of its pieces. Points are 0-dimensional, curves are 1-dimensional,
surfaces are 2-dimensional, and solids are 3-dimensional. Locally, the
dimension of a geometric object at a point is the dimension of a local
neighborhood of the point - that is the dimension of any coordinate
neighborhood of the point. Dimension is unambiguously defined only for
DirectPositions interior to this Object. If the passed DirectPosition2D
is NULL, then the method returns the largest possible dimension for any
DirectPosition2D in this Object.
- Parameters:
point - a DirectPosition2D value
- Returns:
- an
int value
getEnvelope
public Envelope getEnvelope()
- Specified by:
getEnvelope in interface Geometry- Specified by:
getEnvelope in class GeometryImpl
getBoundary
public CurveBoundary getBoundary()
- Specified by:
getBoundary in interface Geometry- Specified by:
getBoundary in interface OrientableCurve- Specified by:
getBoundary in interface Primitive- Specified by:
getBoundary in class GeometryImpl
asLineString
public LineStringImpl asLineString()
- Returns:
- LineStringImpl
asLineString
public LineStringImpl asLineString(double maxSpacing,
double maxOffset)
- Parameters:
maxSpacing - maxOffset -
- Returns:
- LineStringImpl
getLength
public double getLength()
- Returns:
- length
split
public void split(double distance)
- Parameters:
distance -
clone
public CompositeCurveImpl clone()
throws CloneNotSupportedException
- Specified by:
clone in interface Geometry- Specified by:
clone in class GeometryImpl
- Throws:
CloneNotSupportedException
isSimple
public boolean isSimple()
- Specified by:
isSimple in interface Geometry
getComposite
public CompositeCurve getComposite()
- Specified by:
getComposite in interface OrientableCurve- Specified by:
getComposite in interface Primitive
getOrientation
public int getOrientation()
- Specified by:
getOrientation in interface OrientablePrimitive
getPrimitive
public Curve getPrimitive()
- Specified by:
getPrimitive in interface OrientableCurve- Specified by:
getPrimitive in interface OrientablePrimitive
getContainedPrimitives
public Set getContainedPrimitives()
- Specified by:
getContainedPrimitives in interface Primitive
getContainingPrimitives
public Set getContainingPrimitives()
- Specified by:
getContainingPrimitives in interface Primitive
getComplexes
public Set getComplexes()
- Specified by:
getComplexes in interface Primitive
getProxy
public OrientablePrimitive[] getProxy()
- Specified by:
getProxy in interface Primitive
getGenerators
public List<OrientableCurve> getGenerators()
- Specified by:
getGenerators in interface Composite- Specified by:
getGenerators in interface CompositeCurve
getDimension
public int getDimension(DirectPosition point)
- Specified by:
getDimension in interface Geometry- Specified by:
getDimension in class GeometryImpl
getRepresentativePoint
public DirectPosition getRepresentativePoint()
- Specified by:
getRepresentativePoint in interface Geometry- Specified by:
getRepresentativePoint in class GeometryImpl
toString
public String toString()
- Overrides:
toString in class Object
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals in class Object
Copyright © 1996-2009 Geotools. All Rights Reserved.