public class PreparedPolygon extends BasicPreparedGeometry
Polygonal geometries.
This class supports both Polygons and MultiPolygons.
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, withinprivate final boolean isRectangle
private FastSegmentSetIntersectionFinder segIntFinder
private PointOnGeometryLocator pia
public PreparedPolygon(Polygonal poly)
public FastSegmentSetIntersectionFinder getIntersectionFinder()
public PointOnGeometryLocator getPointLocator()
public boolean intersects(Geometry g)
BasicPreparedGeometryintersects in interface PreparedGeometryintersects in class BasicPreparedGeometryg - the Geometry to testGeometry.intersects(Geometry)public boolean contains(Geometry g)
BasicPreparedGeometrycontains in interface PreparedGeometrycontains in class BasicPreparedGeometryg - the Geometry to testGeometry.contains(Geometry)public boolean containsProperly(Geometry g)
BasicPreparedGeometrycontainsProperly in interface PreparedGeometrycontainsProperly in class BasicPreparedGeometryg - the Geometry to testGeometry.contains(org.locationtech.jts.geom.Geometry)public boolean covers(Geometry g)
BasicPreparedGeometrycovers in interface PreparedGeometrycovers in class BasicPreparedGeometryg - the Geometry to testGeometry.covers(Geometry)