public abstract class AbstractMultiPolygon extends AbstractGeometryCollection implements MultiPolygon
Polygons.
As per the OGC SFS specification, the Polygons in a MultiPolygon may not overlap, and may only touch at single points. This allows the topological point-set semantics to be well-defined.
| Constructor and Description |
|---|
AbstractMultiPolygon() |
| 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()
Computes the boundary of this geometry
|
int |
getBoundaryDimension()
Returns the dimension of this
Geometrys inherent boundary. |
DataType |
getDataType() |
int |
getDimension()
Returns the dimension of this geometry.
|
Polygon |
getPolygon(int partIndex) |
<V extends Polygon> |
getPolygons() |
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()). |
Vertex |
getVertex(int... vertexId)
Get the
Vertex at the specified vertexId (see Vertex.getVertexId()). |
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) |
MultiPolygon |
normalize()
Converts this
Geometry to normal form (or
canonical form ). |
MultiPolygon |
reverse()
Creates a
MultiPolygon with
every component reversed. |
Reader<Segment> |
segments() |
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, getBoundingBox, getCentroid, getClassSortIndex, getCoordinateSystem, getEnvelope, getGeometries, getGeometry, getGeometryCount, getGeometryFactory, getGeometryType, getInteriorPoint, getNonZeroGeometryFactory, getSrid, getUserData, getVertexIndex, hashCode, hasInvalidXyCoordinates, hasNonEmptyElements, hasNullElements, intersection, intersects, isAnyTargetComponentInTest, isGeometryCollection, isRectangle, isSimple, isValid, isWithinDistance, overlaps, relate, relate, setUserData, setVertexIndex, symDifference, toString, touches, toWkt, union, union, withinfinalize, getClass, notify, notifyAll, wait, wait, waitcloneappendVertex, 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, getBoundingBox, getCentroid, getClassSortIndex, getCoordinateSystem, getEnvelope, getGeometries, getGeometries, getGeometry, getGeometryComponents, getGeometryCount, getGeometryFactory, getGeometryType, getInteriorPoint, getLength, getPoint, getPointWithin, getSrid, getUserData, getVertexCount, hashCode, hasInvalidXyCoordinates, insertVertex, intersection, intersects, intersects, isEmpty, isRectangle, isSimple, isValid, isWithinDistance, move, overlaps, prepare, relate, relate, setUserData, symDifference, toClockwise, toCounterClockwise, touches, toWkt, union, union, withingetBoundingBoxpublic <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 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 Polygon getPolygon(int partIndex)
getPolygon in interface MultiPolygonpublic <V extends Polygon> List<V> getPolygons()
getPolygons in interface MultiPolygonpublic 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 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.protected 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 MultiPolygon 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 MultiPolygonnormalize in class AbstractGeometryCollectionAbstractGeometry.normalize()public MultiPolygon reverse()
MultiPolygon with
every component reversed.
The order of the components in the collection are not reversed.reverse in interface Geometryreverse in interface MultiPolygonreverse in class AbstractGeometryCollectionpublic Reader<Segment> segments()
segments in interface Geometrysegments in class AbstractGeometryCollectionpublic 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.