public class PreparedMultiPolygon extends AbstractMultiPolygon
MultiPolygonal geometries.
This class supports both MultiPolygons and MultiMultiPolygons.
This class does not support MultiMultiPolygons which are non-valid (e.g. with overlapping elements).
Instances of this class are thread-safe and immutable.
| Constructor and Description |
|---|
PreparedMultiPolygon(MultiPolygon polygon) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(Geometry g)
Tests whether this geometry contains the
argument geometry.
|
boolean |
containsProperly(Geometry geometry) |
boolean |
covers(Geometry geometry)
Tests whether this geometry covers the
argument geometry.
|
BoundingBox |
getBoundingBox()
Gets an
BoundingBoxDoubleGf containing
the minimum and maximum x and y values in this Geometry. |
<V extends Geometry> |
getGeometries() |
<V extends Geometry> |
getGeometry(int partIndex)
Returns an element
Geometry from a GeometryCollection
(or this, if the geometry is not a collection). |
int |
getGeometryCount()
Returns the number of
Geometrys in a GeometryCollection
(or 1, if the geometry is not a collection). |
GeometryFactory |
getGeometryFactory()
Gets the geometryFactory which contains the context in which this geometry was created.
|
FastSegmentSetIntersectionFinder |
getIntersectionFinder()
Gets the indexed intersection finder for this geometry.
|
MultiPolygon |
getMultiPolygon() |
PointOnGeometryLocator |
getPointLocator() |
List<Point> |
getRepresentativePoints()
Gets the list of representative points for this geometry.
|
boolean |
intersects(Geometry geometry)
Tests whether this geometry intersects the argument geometry.
|
MultiPolygon |
prepare() |
copy, equalsExact, getBoundary, getBoundaryDimension, getDataType, getDimension, getPolygon, getPolygons, getSegment, getToVertex, getVertex, isEquivalentClass, moveVertex, normalize, reverse, segments, verticesappendVertex, clone, compareToSameClass, computeBoundingBox, deleteVertex, doEquals, geometries, getArea, getGeometries, getGeometryComponents, getLength, getPoint, getPointWithin, getVertexCount, insertVertex, intersects, isEmpty, move, toClockwise, toCounterClockwisebuffer, buffer, buffer, checkNotGeometryCollection, compare, compareTo, convert, convert, convexHull, coveredBy, createVertexId, crosses, difference, disjoint, distance, envelopeCovers, envelopesIntersect, equal, equals, equals, equals, equalsExact, equalsNorm, equalsTopo, getAxisCount, getCentroid, getClassSortIndex, getCoordinateSystem, getEnvelope, getGeometryType, getInteriorPoint, getNonZeroGeometryFactory, getSrid, getUserData, getVertexIndex, hashCode, hasInvalidXyCoordinates, hasNonEmptyElements, hasNullElements, intersection, 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, convert, convert, convexHull, coveredBy, crosses, deleteVertex, difference, disjoint, distance, equal, equals, equals, equals, equalsExact, equalsNorm, equalsTopo, geometries, getArea, getAxisCount, getCentroid, getClassSortIndex, getCoordinateSystem, getEnvelope, getGeometries, getGeometryComponents, getGeometryType, getInteriorPoint, getLength, getPoint, getPointWithin, getSrid, getUserData, getVertexCount, hashCode, hasInvalidXyCoordinates, insertVertex, intersection, intersects, isEmpty, isRectangle, isSimple, isValid, isWithinDistance, move, overlaps, relate, relate, setUserData, symDifference, toClockwise, toCounterClockwise, touches, toWkt, union, union, withinpublic PreparedMultiPolygon(MultiPolygon polygon)
public boolean contains(Geometry g)
AbstractGeometry
The contains predicate has the following equivalent definitions:
[T*****FF*]
g.within(this) = true
contains is the converse of AbstractGeometry.within(com.revolsys.jts.geom.Geometry) )
B.contains(A) = false.
(As a concrete example, take A to be a LineString which lies in the boundary of a Polygon B.)
For a predicate with similar behaviour but avoiding
this subtle limitation, see AbstractGeometry.covers(com.revolsys.jts.geom.Geometry).contains in interface Geometrycontains in class AbstractGeometryg - the Geometry with which to compare this Geometrytrue if this Geometry contains gGeometry.within(com.revolsys.jts.geom.Geometry),
Geometry.covers(com.revolsys.jts.geom.Geometry)public boolean containsProperly(Geometry geometry)
containsProperly in interface GeometrycontainsProperly in class AbstractGeometrypublic boolean covers(Geometry geometry)
AbstractGeometry
The covers predicate has the following equivalent definitions:
[T*****FF*]
[*T****FF*]
[***T**FF*]
[****T*FF*]
g.coveredBy(this) = true
covers is the converse of AbstractGeometry.coveredBy(com.revolsys.jts.geom.Geometry))
false.
This predicate is similar to AbstractGeometry.contains(com.revolsys.jts.geom.Geometry),
but is more inclusive (i.e. returns true for more cases).
In particular, unlike contains it does not distinguish between
points in the boundary and in the interior of geometries.
For most situations, covers should be used in preference to contains.
As an added benefit, covers is more amenable to optimization,
and hence should be more performant.
covers in interface Geometrycovers in class AbstractGeometrygeometry - the Geometry with which to compare this Geometrytrue if this Geometry covers gGeometry.contains(com.revolsys.jts.geom.Geometry),
Geometry.coveredBy(com.revolsys.jts.geom.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 interface PolygonalgetBoundingBox in class AbstractGeometryGeometry.public <V extends Geometry> List<V> getGeometries()
getGeometries in interface GeometrygetGeometries in class AbstractGeometrypublic <V extends Geometry> V getGeometry(int partIndex)
AbstractGeometryGeometry from a GeometryCollection
(or this, if the geometry is not a collection).getGeometry in interface GeometrygetGeometry in class AbstractGeometrypartIndex - the index of the geometry elementpublic int getGeometryCount()
AbstractGeometryGeometrys in a GeometryCollection
(or 1, if the geometry is not a collection).getGeometryCount in interface GeometrygetGeometryCount in class AbstractGeometrypublic GeometryFactory getGeometryFactory()
GeometrygetGeometryFactory in interface GeometrygetGeometryFactory in class AbstractGeometrypublic FastSegmentSetIntersectionFinder getIntersectionFinder()
public MultiPolygon getMultiPolygon()
public PointOnGeometryLocator getPointLocator()
public List<Point> getRepresentativePoints()
public boolean intersects(Geometry geometry)
AbstractGeometry
The intersects predicate has the following equivalent definitions:
[T********]
[*T*******]
[***T*****]
[****T****]
! g.disjoint(this) = true
intersects is the inverse of disjoint)
intersects in interface Geometryintersects in class AbstractGeometrygeometry - the Geometry with which to compare this Geometrytrue if the two Geometrys intersectGeometry.disjoint(com.revolsys.jts.geom.Geometry)public MultiPolygon prepare()
Copyright © 2015 Revolution Systems Inc.. All rights reserved.