com.vividsolutions.jts.geom
Class LinearRing

java.lang.Object
  extended bycom.vividsolutions.jts.geom.Geometry
      extended bycom.vividsolutions.jts.geom.LineString
          extended bycom.vividsolutions.jts.geom.LinearRing
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable, java.io.Serializable

public class LinearRing
extends LineString

Basic implementation of LinearRing. The first and last point in the coordinate sequence must be equal. Either orientation of the ring is allowed. A valid ring must not self-intersect.

Version:
1.4.0
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.vividsolutions.jts.geom.Geometry
envelope, SRID
 
Constructor Summary
LinearRing(Coordinate[] points, PrecisionModel precisionModel, int SRID)
          Deprecated. Use GeometryFactory instead
LinearRing(CoordinateSequence points, GeometryFactory factory)
          Constructs a LinearRing with the given points.
 
Method Summary
 java.lang.String getGeometryType()
          Returns the name of this object's com.vivid.jts.geom interface.
 boolean isClosed()
           
 boolean isSimple()
          Returns false if the Geometry not simple.
 
Methods inherited from class com.vividsolutions.jts.geom.LineString
apply, apply, apply, clone, compareToSameClass, computeEnvelopeInternal, equalsExact, getBoundary, getBoundaryDimension, getCoordinate, getCoordinateN, getCoordinates, getCoordinateSequence, getDimension, getEndPoint, getLength, getNumPoints, getPointN, getStartPoint, isCoordinate, isEmpty, isEquivalentClass, isRing, normalize
 
Methods inherited from class com.vividsolutions.jts.geom.Geometry
buffer, buffer, checkNotGeometryCollection, compare, compareTo, contains, convexHull, crosses, difference, disjoint, distance, equal, equals, equalsExact, fromInternalGeometry, geometryChanged, geometryChangedAction, getArea, getCentroid, getEnvelope, getEnvelopeInternal, getFactory, getInteriorPoint, getPrecisionModel, getSRID, getUserData, hasNonEmptyElements, hasNullElements, intersection, intersects, isValid, isWithinDistance, overlaps, relate, relate, setSRID, setUserData, symDifference, toInternalGeometry, toString, toText, touches, union, within
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LinearRing

public LinearRing(Coordinate[] points,
                  PrecisionModel precisionModel,
                  int SRID)
Deprecated. Use GeometryFactory instead

Constructs a LinearRing with the given points.

Parameters:
points - points forming a closed and simple linestring, or null or an empty array to create the empty geometry. This array must not contain null elements.
precisionModel - the specification of the grid of allowable points for this LinearRing
SRID - the ID of the Spatial Reference System used by this LinearRing

LinearRing

public LinearRing(CoordinateSequence points,
                  GeometryFactory factory)
Constructs a LinearRing with the given points.

Parameters:
points - points forming a closed and simple linestring, or null or an empty array to create the empty geometry. This array must not contain null elements.
Method Detail

isSimple

public boolean isSimple()
Description copied from class: Geometry
Returns false if the Geometry not simple. Subclasses provide their own definition of "simple". If this Geometry is empty, returns true.

In general, the SFS specifications of simplicity seem to follow the following rule:

For all empty Geometrys, isSimple = true.

Overrides:
isSimple in class LineString

getGeometryType

public java.lang.String getGeometryType()
Description copied from class: Geometry
Returns the name of this object's com.vivid.jts.geom interface.

Overrides:
getGeometryType in class LineString

isClosed

public boolean isClosed()
Overrides:
isClosed in class LineString