public abstract class AbstractMultiLineString extends AbstractGeometryCollection implements MultiLineString
Any collection of LineStrings is a valid MultiLineString.
| Constructor and Description |
|---|
AbstractMultiLineString() |
| Modifier and Type | Method and Description |
|---|---|
<V extends Geometry> |
copy(GeometryFactory geometryFactory)
Create a copy of the geometry io the requried geometry factory.
|
boolean |
equalsExact(Geometry other,
double tolerance)
Returns true if the two
Geometrys are exactly equal,
up to a specified distance tolerance. |
Geometry |
getBoundary()
Gets the boundary of this geometry.
|
int |
getBoundaryDimension()
Returns the dimension of this
Geometrys inherent boundary. |
BoundingBox |
getBoundingBox()
Gets an
BoundingBoxDoubleGf containing
the minimum and maximum x and y values in this Geometry. |
DataType |
getDataType() |
int |
getDimension()
Returns the dimension of this geometry.
|
LineString |
getLineString(int partIndex) |
<V extends LineString> |
getLineStrings() |
Segment |
getSegment(int... segmentId)
Get the
Segment at the specified vertexId (see Segment.getSegmentId()). |
Vertex |
getToVertex(int... vertexId)
Get the
Vertex at the specified vertexId starting at the end of the geometry (see Vertex.getVertexId()). |
Object |
getUserData()
Gets the user data object for this geometry, if any.
|
Vertex |
getVertex(int... vertexId)
Get the
Vertex at the specified vertexId (see Vertex.getVertexId()). |
boolean |
isClosed() |
protected boolean |
isEquivalentClass(Geometry other)
Returns whether the two
Geometrys are equal, from the point
of view of the equalsExact method. |
<V extends Geometry> |
moveVertex(Point newPoint,
int... vertexId) |
MultiLineString |
normalize()
Converts this
Geometry to normal form (or
canonical form ). |
MultiLineString |
reverse()
Creates a
MultiLineString in the reverse
order to this object. |
Reader<Segment> |
segments() |
void |
setUserData(Object userData)
A simple scheme for applications to add their own custom data to a Geometry.
|
Reader<Vertex> |
vertices()
|
appendVertex, clone, compareToSameClass, computeBoundingBox, deleteVertex, doEquals, geometries, getArea, getGeometries, getGeometryComponents, getLength, getPoint, getPointWithin, getVertexCount, insertVertex, intersects, isEmpty, move, toClockwise, toCounterClockwisebuffer, buffer, buffer, checkNotGeometryCollection, compare, compareTo, contains, containsProperly, convert, convert, convexHull, coveredBy, covers, createVertexId, crosses, difference, disjoint, distance, envelopeCovers, envelopesIntersect, equal, equals, equals, equals, equalsExact, equalsNorm, equalsTopo, getAxisCount, getCentroid, getClassSortIndex, getCoordinateSystem, getEnvelope, getGeometries, getGeometry, getGeometryCount, getGeometryFactory, getGeometryType, getInteriorPoint, getNonZeroGeometryFactory, getSrid, getVertexIndex, hashCode, hasInvalidXyCoordinates, hasNonEmptyElements, hasNullElements, intersection, intersects, isAnyTargetComponentInTest, isGeometryCollection, isRectangle, isSimple, isValid, isWithinDistance, overlaps, relate, relate, setVertexIndex, symDifference, toString, touches, toWkt, union, union, withinfinalize, getClass, notify, notifyAll, wait, wait, waitpreparecloneappendVertex, buffer, buffer, buffer, compareTo, compareToSameClass, contains, containsProperly, convert, convert, convexHull, coveredBy, covers, crosses, deleteVertex, difference, disjoint, distance, equal, equals, equals, equals, equalsExact, equalsNorm, equalsTopo, geometries, getArea, getAxisCount, getCentroid, getClassSortIndex, getCoordinateSystem, getEnvelope, getGeometries, getGeometries, getGeometry, getGeometryComponents, getGeometryCount, getGeometryFactory, getGeometryType, getInteriorPoint, getLength, getPoint, getPointWithin, getSrid, getVertexCount, hashCode, hasInvalidXyCoordinates, insertVertex, intersection, intersects, intersects, isEmpty, isRectangle, isSimple, isValid, isWithinDistance, move, overlaps, relate, relate, symDifference, toClockwise, toCounterClockwise, touches, toWkt, union, union, withinpublic <V extends Geometry> V copy(GeometryFactory geometryFactory)
Geometrycopy in interface Geometrycopy in class AbstractGeometryCollectiongeometryFactory - The geometry factory to convert the geometry to.public boolean equalsExact(Geometry other, double tolerance)
AbstractGeometryGeometrys are exactly equal,
up to a specified distance tolerance.
Two Geometries are exactly equal within a distance tolerance
if and only if:
GeometryFactory, the SRID,
or the userData fields.
To properly test equality between different geometries,
it is usually necessary to AbstractGeometry.normalize() them first.
equalsExact in interface GeometryequalsExact in class AbstractGeometryCollectionother - the Geometry with which to compare this Geometrytolerance - distance at or below which two Coordinates
are considered equaltrue if this and the other Geometry
have identical structure and point values, up to the distance tolerance.AbstractGeometry.equals(2,Geometry),
AbstractGeometry.normalize(),
#norm()public Geometry getBoundary()
getBoundary in interface GeometrygetBoundary in class AbstractGeometryCollectionGeometry.getBoundary()public int getBoundaryDimension()
AbstractGeometryGeometrys inherent boundary.getBoundaryDimension in interface GeometrygetBoundaryDimension in class AbstractGeometryCollectionDimension.FALSE if the boundary is the empty geometry.public BoundingBox getBoundingBox()
AbstractGeometryBoundingBoxDoubleGf containing
the minimum and maximum x and y values in this Geometry.
If the geometry is empty, an empty BoundingBoxDoubleGf
is returned.
The returned object is a copy of the one maintained internally, to avoid aliasing issues. For best performance, clients which access this boundingBox frequently should cache the return value.
getBoundingBox in interface GeometrygetBoundingBox in class AbstractGeometryGeometry.public DataType getDataType()
getDataType in interface DataTypeProxygetDataType in class AbstractGeometryCollectionpublic int getDimension()
AbstractGeometry
Note that this is a different concept to the dimension of
the vertex Coordinatess.
The geometry dimension can never be greater than the coordinate dimension.
For example, a 0-dimensional geometry (e.g. a Point)
may have a coordinate dimension of 3 (X,Y,Z).
getDimension in interface GeometrygetDimension in class AbstractGeometryCollectionpublic LineString getLineString(int partIndex)
getLineString in interface MultiLineStringpublic <V extends LineString> List<V> getLineStrings()
getLineStrings in interface MultiLineStringpublic Segment getSegment(int... segmentId)
GeometryGet the Segment at the specified vertexId (see Segment.getSegmentId()).
getSegment in interface GeometrygetSegment in class AbstractGeometryCollectionpublic Vertex getToVertex(int... vertexId)
GeometryGet the Vertex at the specified vertexId starting at the end of the geometry (see Vertex.getVertexId()).
getToVertex in interface GeometrygetToVertex in class AbstractGeometryCollectionvertexId - The id of the vertex.public Object getUserData()
getUserData in interface GeometrygetUserData in class AbstractGeometrynull if none setpublic Vertex getVertex(int... vertexId)
GeometryGet the Vertex at the specified vertexId (see Vertex.getVertexId()).
getVertex in interface GeometrygetVertex in class AbstractGeometryCollectionvertexId - The id of the vertex.public boolean isClosed()
isClosed in interface MultiLineStringprotected boolean isEquivalentClass(Geometry other)
AbstractGeometryGeometrys are equal, from the point
of view of the equalsExact method. Called by equalsExact
. In general, two Geometry classes are considered to be
"equivalent" only if they are the same class. An exception is LineString
, which is considered to be equivalent to its subclasses.isEquivalentClass in class AbstractGeometryCollectionother - the Geometry with which to compare this Geometry
for equalitytrue if the classes of the two Geometry
s are considered to be equal by the equalsExact method.public <V extends Geometry> V moveVertex(Point newPoint, int... vertexId)
moveVertex in interface GeometrymoveVertex in class AbstractGeometryCollectionpublic MultiLineString normalize()
AbstractGeometryGeometry to normal form (or
canonical form ). Normal form is a unique representation for Geometry
s. It can be used to test whether two Geometrys are equal
in a way that is independent of the ordering of the coordinates within
them. Normal form equality is a stronger condition than topological
equality, but weaker than pointwise equality. The definitions for normal
form use the standard lexicographical ordering for coordinates. "Sorted in
order of coordinates" means the obvious extension of this ordering to
sequences of coordinates.normalize in interface Geometrynormalize in interface GeometryCollectionnormalize in interface MultiLineStringnormalize in class AbstractGeometryCollectionAbstractGeometry.normalize()public MultiLineString reverse()
MultiLineString in the reverse
order to this object.
Both the order of the component LineStrings
and the order of their coordinate sequences
are reversed.reverse in interface Geometryreverse in interface MultiLineStringreverse in class AbstractGeometryCollectionMultiLineString in the reverse orderpublic Reader<Segment> segments()
segments in interface Geometrysegments in class AbstractGeometryCollectionpublic void setUserData(Object userData)
Note that user data objects are not present in geometries created by construction methods.
setUserData in interface GeometrysetUserData in class AbstractGeometryuserData - an object, the semantics for which are defined by the
application using this Geometrypublic Reader<Vertex> vertices()
GeometryGet an Iterable that iterates over the Vertex of the geometry. For memory
efficiency the Vertex returned is the same instance for each call to next
on the iterator. If the vertex is required to track the previous vertex then the
Vertex.clone() method must be called to get a copy of the vertex.
The Iterable.iterator() method always returns the same Iterator instance.
Therefore that method should not be called more than once.
vertices in interface Geometryvertices in class AbstractGeometryCollectionCopyright © 2015 Revolution Systems Inc.. All rights reserved.