|
JTS Topology Suite version 1.12 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vividsolutions.jts.geom.Geometry com.vividsolutions.jts.geom.LineString com.vividsolutions.jts.geom.LinearRing
public class LinearRing
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.
A ring must have either 0 or 4 or more points.
The first and last points must be equal (in 2D).
If these conditions are not met, the constructors throw
an IllegalArgumentException
Field Summary | |
---|---|
static int |
MINIMUM_VALID_SIZE
The minimum number of vertices allowed in a valid non-empty ring (= 4). |
Fields inherited from class com.vividsolutions.jts.geom.LineString |
---|
points |
Fields inherited from class com.vividsolutions.jts.geom.Geometry |
---|
envelope, factory, SRID |
Constructor Summary | |
---|---|
LinearRing(Coordinate[] points,
PrecisionModel precisionModel,
int SRID)
Deprecated. Use GeometryFactory instead |
|
LinearRing(CoordinateSequence points,
GeometryFactory factory)
Constructs a LinearRing with the vertices
specifed by the given CoordinateSequence . |
Method Summary | |
---|---|
int |
getBoundaryDimension()
Returns Dimension.FALSE , since by definition LinearRings do
not have a boundary. |
java.lang.String |
getGeometryType()
Returns the name of this object's com.vivid.jts.geom
interface. |
boolean |
isClosed()
|
boolean |
isSimple()
Returns true , since by definition LinearRings are always simple. |
Geometry |
reverse()
Creates a LineString whose coordinates are in the reverse
order of this objects |
Methods inherited from class com.vividsolutions.jts.geom.LineString |
---|
apply, apply, apply, apply, clone, compareToSameClass, compareToSameClass, computeEnvelopeInternal, equalsExact, getBoundary, 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, buffer, checkNotGeometryCollection, compare, compareTo, compareTo, contains, convexHull, coveredBy, covers, crosses, difference, disjoint, distance, equal, equals, equals, equalsExact, equalsNorm, equalsTopo, geometryChanged, geometryChangedAction, getArea, getCentroid, getEnvelope, getEnvelopeInternal, getFactory, getGeometryN, getInteriorPoint, getNumGeometries, getPrecisionModel, getSRID, getUserData, hashCode, hasNonEmptyElements, hasNullElements, intersection, intersects, isGeometryCollection, isRectangle, isValid, isWithinDistance, norm, overlaps, relate, relate, setSRID, setUserData, symDifference, toString, toText, touches, union, union, within |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int MINIMUM_VALID_SIZE
Constructor Detail |
---|
public LinearRing(Coordinate[] points, PrecisionModel precisionModel, int SRID)
LinearRing
with the given points.
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
java.lang.IllegalArgumentException
- if the ring is not closed, or has too few pointspublic LinearRing(CoordinateSequence points, GeometryFactory factory)
LinearRing
with the vertices
specifed by the given CoordinateSequence
.
points
- a sequence points forming a closed and simple linestring, or
null
to create the empty geometry.
java.lang.IllegalArgumentException
- if the ring is not closed, or has too few pointsMethod Detail |
---|
public int getBoundaryDimension()
Dimension.FALSE
, since by definition LinearRings do
not have a boundary.
getBoundaryDimension
in class LineString
public boolean isSimple()
true
, since by definition LinearRings are always simple.
isSimple
in class Geometry
true
Geometry.isSimple()
public boolean isClosed()
isClosed
in class LineString
public java.lang.String getGeometryType()
Geometry
com.vivid.jts.geom
interface.
getGeometryType
in class LineString
Geometry
s most specific com.vividsolutions.jts.geom
interfacepublic Geometry reverse()
LineString
LineString
whose coordinates are in the reverse
order of this objects
reverse
in class LineString
LineString
with coordinates in the reverse order
|
JTS Topology Suite version 1.12 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |