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

java.lang.Object
  extended by org.geotools.geometry.jts.spatialschema.geometry.GeometryImpl
      extended by org.geotools.geometry.jts.spatialschema.geometry.complex.ComplexImpl
          extended by org.geotools.geometry.jts.spatialschema.geometry.complex.CompositeImpl
              extended by org.geotools.geometry.jts.spatialschema.geometry.complex.CompositeCurveImpl
                  extended by org.geotools.geometry.jts.spatialschema.geometry.primitive.RingImpl
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, JTSGeometry, 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.primitive.Ring, org.opengis.geometry.TransfiniteSet

public class RingImpl
extends CompositeCurveImpl
implements org.opengis.geometry.primitive.Ring

Represent a single connected component of a surface boundary. It consists of a number of references to orientable curves connected in a cycle (an object whose boundary is empty). A Ring is structurally similar to a composite curve in that the end point of each orientable curve in the sequence is the start point of the next orientable curve in the sequence. Since the sequence is circular, there is no exception to this rule. Each ring, like all boundaries is a cycle and each ring is simple.

Even though each Ring is simple, the boundary need not be simple. The easiest case of this is where one of the interior rings of a surface is tangent to its exterior ring. Implementations may enforce stronger restrictions on the interaction of boundary elements.

This implementation does not automatically close itself. The isValid method returns false if the curve is either not closed or crosses itself.

Version:
2.0
Author:
ISO/DIS 19107, OpenGIS® consortium
See Also:
SurfaceBoundary, Shell, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.geotools.geometry.jts.spatialschema.geometry.GeometryImpl
GeometryImpl.MathTransformFilter
 
Field Summary
 
Fields inherited from class org.geotools.geometry.jts.spatialschema.geometry.complex.ComplexImpl
setViewOfElements
 
Constructor Summary
RingImpl()
          Constructs a new Ring instance with no CRS and no parent curve.
RingImpl(org.opengis.geometry.complex.CompositeCurve parentCurve)
          Constructs a new Ring instance with the given curve as its parent and with the CRS retrieved from parentCurve.
RingImpl(org.opengis.geometry.complex.CompositeCurve parentCurve, org.opengis.referencing.crs.CoordinateReferenceSystem crs)
           
RingImpl(org.opengis.referencing.crs.CoordinateReferenceSystem crs)
          Constructs a new Ring instance with the given CRS and no parent curve.
 
Method Summary
 boolean isValid()
          This implementation returns true if the curve does not cross itself, false otherwise.
 
Methods inherited from class org.geotools.geometry.jts.spatialschema.geometry.complex.CompositeCurveImpl
getBoundary, getComplexes, getComposite, getContainedPrimitives, getContainingPrimitives, getGenerators, getOrientation, getPrimitive, getProxy
 
Methods inherited from class org.geotools.geometry.jts.spatialschema.geometry.complex.ComplexImpl
computeJTSPeer, getElementList, getElements, getSubComplexes, getSubComplexSet, getSuperComplexes, isMaximal
 
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.primitive.Ring
isSimple
 
Methods inherited from interface org.opengis.geometry.complex.CompositeCurve
getGenerators
 
Methods inherited from interface org.opengis.geometry.complex.Complex
getElements, getSubComplexes, getSuperComplexes, isMaximal
 
Methods inherited from interface org.opengis.geometry.primitive.OrientableCurve
getBoundary, getComposite, getPrimitive
 
Methods inherited from interface org.opengis.geometry.primitive.OrientablePrimitive
getOrientation
 
Methods inherited from interface org.opengis.geometry.primitive.Primitive
getComplexes, getContainedPrimitives, getContainingPrimitives, getProxy
 
Methods inherited from interface org.opengis.geometry.Geometry
clone, distance, getBuffer, getCentroid, getClosure, getConvexHull, getCoordinateDimension, getCoordinateReferenceSystem, getDimension, getEnvelope, getMaximalComplex, getMbRegion, getPrecision, getRepresentativePoint, isCycle, isMutable, toImmutable, transform, transform
 
Methods inherited from interface org.opengis.geometry.TransfiniteSet
contains, contains, difference, equals, intersection, intersects, symmetricDifference, union
 

Constructor Detail

RingImpl

public RingImpl()
Constructs a new Ring instance with no CRS and no parent curve.


RingImpl

public RingImpl(org.opengis.referencing.crs.CoordinateReferenceSystem crs)
Constructs a new Ring instance with the given CRS and no parent curve.


RingImpl

public RingImpl(org.opengis.geometry.complex.CompositeCurve parentCurve)
Constructs a new Ring instance with the given curve as its parent and with the CRS retrieved from parentCurve.


RingImpl

public RingImpl(org.opengis.geometry.complex.CompositeCurve parentCurve,
                org.opengis.referencing.crs.CoordinateReferenceSystem crs)
Method Detail

isValid

public boolean isValid()
This implementation returns true if the curve does not cross itself, false otherwise. It does not test for closure or disconnects. To check for disconnects, call the superclass method.

Returns:
True if this object's coordinates are a valid Ring.


Copyright © 1996-2010 Geotools. All Rights Reserved.