com.vividsolutions.jts.geom

Class LinearRing

Implemented Interfaces:
Cloneable, Comparable, Serializable

public class LinearRing
extends LineString

Models an OGC SFS LinearRing. A LinearRing is a LineString which is both closed and simple. In other words, the first and last coordinate in the ring must be equal, and the interior of the ring must not self-intersect. Either orientation of the ring is allowed.
Version:
1.7

Field Summary

Fields inherited from class com.vividsolutions.jts.geom.Geometry

SRID, envelope

Constructor Summary

LinearRing(CoordinateSequence points, GeometryFactory factory)
Constructs a LinearRing with the vertices specifed by the given CoordinateSequence.
LinearRing(points[] , PrecisionModel precisionModel, int SRID)
Deprecated. Use GeometryFactory instead

Method Summary

String
getGeometryType()
boolean
isSimple()
Returns true, since by definition LinearRings are always simple.

Methods inherited from class com.vividsolutions.jts.geom.LineString

apply, apply, apply, clone, compareToSameClass, compareToSameClass, computeEnvelopeInternal, equalsExact, getBoundary, getBoundaryDimension, getCoordinate, getCoordinateN, getCoordinateSequence, getCoordinates, getDimension, getEndPoint, getGeometryType, getLength, getNumPoints, getPointN, getStartPoint, isClosed, isCoordinate, isEmpty, isEquivalentClass, isRing, isSimple, normalize, reverse

Methods inherited from class com.vividsolutions.jts.geom.Geometry

apply, apply, apply, buffer, buffer, buffer, checkNotGeometryCollection, clone, compare, compareTo, compareTo, compareToSameClass, compareToSameClass, computeEnvelopeInternal, contains, convexHull, coveredBy, covers, crosses, difference, disjoint, distance, equal, equals, equalsExact, equalsExact, geometryChanged, geometryChangedAction, getArea, getBoundary, getBoundaryDimension, getCentroid, getCoordinate, getCoordinates, getDimension, getEnvelope, getEnvelopeInternal, getFactory, getGeometryN, getGeometryType, getInteriorPoint, getLength, getNumGeometries, getNumPoints, getPrecisionModel, getSRID, getUserData, hasNonEmptyElements, hasNullElements, intersection, intersects, isEmpty, isEquivalentClass, isRectangle, isSimple, isValid, isWithinDistance, normalize, overlaps, relate, relate, setSRID, setUserData, symDifference, toString, toText, touches, union, within

Constructor Details

LinearRing

public LinearRing(CoordinateSequence points,
                  GeometryFactory factory)
Constructs a LinearRing with the vertices specifed by the given CoordinateSequence.
Parameters:
points - a sequence points forming a closed and simple linestring, or null to create the empty geometry.

LinearRing

public LinearRing(points[] ,
                  PrecisionModel precisionModel,
                  int SRID)

Deprecated. Use GeometryFactory instead

Constructs a LinearRing with the given points.
Parameters:
precisionModel - the specification of the grid of allowable points for this LinearRing
SRID - the ID of the Spatial Reference System used by this LinearRing

Method Details

getGeometryType

public String getGeometryType()
Overrides:
getGeometryType in interface LineString

isSimple

public boolean isSimple()
Returns true, since by definition LinearRings are always simple.
Overrides:
isSimple in interface LineString
Returns:
true