public class PreparedPolygon extends BasicPreparedGeometry
Polygonal
geometries.
This class supports both Polygon
s and MultiPolygon
s.
This class does not support MultiPolygons which are non-valid (e.g. with overlapping elements).
Instances of this class are thread-safe and immutable.
Modifier and Type | Field and Description |
---|---|
private boolean |
isRectangle |
private PointOnGeometryLocator |
pia |
private FastSegmentSetIntersectionFinder |
segIntFinder |
Constructor and Description |
---|
PreparedPolygon(Polygonal poly) |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(Geometry g)
Default implementation.
|
boolean |
containsProperly(Geometry g)
Default implementation.
|
boolean |
covers(Geometry g)
Default implementation.
|
FastSegmentSetIntersectionFinder |
getIntersectionFinder()
Gets the indexed intersection finder for this geometry.
|
PointOnGeometryLocator |
getPointLocator() |
boolean |
intersects(Geometry g)
Default implementation.
|
coveredBy, crosses, disjoint, envelopeCovers, envelopesIntersect, getGeometry, getRepresentativePoints, isAnyTargetComponentInTest, overlaps, toString, touches, within
private final boolean isRectangle
private FastSegmentSetIntersectionFinder segIntFinder
private PointOnGeometryLocator pia
public PreparedPolygon(Polygonal poly)
public FastSegmentSetIntersectionFinder getIntersectionFinder()
public PointOnGeometryLocator getPointLocator()
public boolean intersects(Geometry g)
BasicPreparedGeometry
intersects
in interface PreparedGeometry
intersects
in class BasicPreparedGeometry
g
- the Geometry to testGeometry.intersects(Geometry)
public boolean contains(Geometry g)
BasicPreparedGeometry
contains
in interface PreparedGeometry
contains
in class BasicPreparedGeometry
g
- the Geometry to testGeometry.contains(Geometry)
public boolean containsProperly(Geometry g)
BasicPreparedGeometry
containsProperly
in interface PreparedGeometry
containsProperly
in class BasicPreparedGeometry
g
- the Geometry to testGeometry.contains(org.locationtech.jts.geom.Geometry)
public boolean covers(Geometry g)
BasicPreparedGeometry
covers
in interface PreparedGeometry
covers
in class BasicPreparedGeometry
g
- the Geometry to testGeometry.covers(Geometry)