org.geotools.geometry.iso.complex
Class CompositeCurveImpl

java.lang.Object
  extended by org.geotools.geometry.iso.root.GeometryImpl
      extended by org.geotools.geometry.iso.complex.ComplexImpl
          extended by org.geotools.geometry.iso.complex.CompositeImpl<OrientableCurveImpl>
              extended by org.geotools.geometry.iso.complex.CompositeCurveImpl
All Implemented Interfaces:
java.io.Serializable, org.opengis.geometry.complex.Complex, org.opengis.geometry.complex.Composite, org.opengis.geometry.complex.CompositeCurve, org.opengis.geometry.Geometry, org.opengis.geometry.primitive.OrientableCurve, org.opengis.geometry.primitive.OrientablePrimitive, org.opengis.geometry.primitive.Primitive, org.opengis.geometry.TransfiniteSet
Direct Known Subclasses:
RingImplUnsafe

public class CompositeCurveImpl
extends CompositeImpl<OrientableCurveImpl>
implements org.opengis.geometry.complex.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

Field Summary
protected  EnvelopeImpl envelope
           
 
Fields inherited from class org.geotools.geometry.iso.complex.ComplexImpl
elements
 
Fields inherited from class org.geotools.geometry.iso.root.GeometryImpl
crs, percision
 
Constructor Summary
CompositeCurveImpl(java.util.List<org.opengis.geometry.primitive.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.
 
Method Summary
 LineStringImpl asLineString()
           
 LineStringImpl asLineString(double maxSpacing, double maxOffset)
           
 CompositeCurveImpl clone()
           
 java.util.Set<org.opengis.geometry.complex.Complex> createBoundary()
           
 boolean equals(java.lang.Object obj)
           
 org.opengis.geometry.primitive.CurveBoundary getBoundary()
           
 java.util.Set getComplexes()
           
 org.opengis.geometry.complex.CompositeCurve getComposite()
           
 java.util.Set getContainedPrimitives()
           
 java.util.Set getContainingPrimitives()
           
 int getDimension(org.opengis.geometry.DirectPosition point)
           
 int getDimension(DirectPositionImpl point)
          The method dimension returns the inherent dimension of this Object, which is less than or equal to the coordinate dimension.
 java.util.List<org.opengis.geometry.primitive.Primitive> getElements()
          Returns elements contained in this Complex
 org.opengis.geometry.Envelope getEnvelope()
           
 java.lang.Class getGeneratorClass()
           
 java.util.List<org.opengis.geometry.primitive.OrientableCurve> getGenerators()
           
 double getLength()
           
 int getOrientation()
           
 org.opengis.geometry.primitive.Curve getPrimitive()
           
 org.opengis.geometry.primitive.OrientablePrimitive[] getProxy()
           
 org.opengis.geometry.DirectPosition getRepresentativePoint()
           
 int hashCode()
           
 boolean isSimple()
           
 void split(double distance)
           
 java.lang.String toString()
           
 
Methods inherited from class org.geotools.geometry.iso.complex.ComplexImpl
addSubComplex, addSuperComplex, getMaximalComplex, getSubComplexes, getSuperComplexes, isMaximal, setElements
 
Methods inherited from class org.geotools.geometry.iso.root.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 class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.opengis.geometry.complex.Complex
getSubComplexes, getSuperComplexes, isMaximal
 
Methods inherited from interface org.opengis.geometry.Geometry
distance, getBuffer, getCentroid, getClosure, getConvexHull, getCoordinateDimension, getCoordinateReferenceSystem, getMaximalComplex, getMbRegion, getPrecision, isCycle, isMutable, toImmutable, transform, transform
 
Methods inherited from interface org.opengis.geometry.TransfiniteSet
contains, contains, difference, equals, intersection, intersects, symmetricDifference, union
 

Field Detail

envelope

protected EnvelopeImpl envelope
Constructor Detail

CompositeCurveImpl

public CompositeCurveImpl(java.util.List<org.opengis.geometry.primitive.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 -
Method Detail

getElements

public java.util.List<org.opengis.geometry.primitive.Primitive> getElements()
Description copied from class: ComplexImpl
Returns elements contained in this Complex

Specified by:
getElements in interface org.opengis.geometry.complex.Complex
Overrides:
getElements in class ComplexImpl
Returns:
the primitives

createBoundary

public java.util.Set<org.opengis.geometry.complex.Complex> createBoundary()
Specified by:
createBoundary in class ComplexImpl
Returns:
Set

getGeneratorClass

public java.lang.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 org.opengis.geometry.Envelope getEnvelope()
Specified by:
getEnvelope in interface org.opengis.geometry.Geometry
Specified by:
getEnvelope in class GeometryImpl

getBoundary

public org.opengis.geometry.primitive.CurveBoundary getBoundary()
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
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 java.lang.CloneNotSupportedException
Specified by:
clone in interface org.opengis.geometry.Geometry
Specified by:
clone in class GeometryImpl
Throws:
java.lang.CloneNotSupportedException

isSimple

public boolean isSimple()
Specified by:
isSimple in interface org.opengis.geometry.Geometry

getComposite

public org.opengis.geometry.complex.CompositeCurve getComposite()
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()
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()
Specified by:
getContainedPrimitives in interface org.opengis.geometry.primitive.Primitive

getContainingPrimitives

public java.util.Set getContainingPrimitives()
Specified by:
getContainingPrimitives in interface org.opengis.geometry.primitive.Primitive

getComplexes

public java.util.Set getComplexes()
Specified by:
getComplexes in interface org.opengis.geometry.primitive.Primitive

getProxy

public org.opengis.geometry.primitive.OrientablePrimitive[] getProxy()
Specified by:
getProxy in interface org.opengis.geometry.primitive.Primitive

getGenerators

public java.util.List<org.opengis.geometry.primitive.OrientableCurve> getGenerators()
Specified by:
getGenerators in interface org.opengis.geometry.complex.Composite
Specified by:
getGenerators in interface org.opengis.geometry.complex.CompositeCurve

getDimension

public int getDimension(org.opengis.geometry.DirectPosition point)
Specified by:
getDimension in interface org.opengis.geometry.Geometry
Specified by:
getDimension in class GeometryImpl

getRepresentativePoint

public org.opengis.geometry.DirectPosition getRepresentativePoint()
Specified by:
getRepresentativePoint in interface org.opengis.geometry.Geometry
Specified by:
getRepresentativePoint in class GeometryImpl

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


Copyright © 1996-2010 Geotools. All Rights Reserved.