Package org.locationtech.jts.geom.prep
Class PreparedPolygon
- java.lang.Object
-
- org.locationtech.jts.geom.prep.BasicPreparedGeometry
-
- org.locationtech.jts.geom.prep.PreparedPolygon
-
- All Implemented Interfaces:
PreparedGeometry
public class PreparedPolygon extends BasicPreparedGeometry
A prepared version forPolygonalgeometries. This class supports bothPolygons andMultiPolygons.This class does not support MultiPolygons which are non-valid (e.g. with overlapping elements).
Instances of this class are thread-safe and immutable.
-
-
Field Summary
Fields Modifier and Type Field Description private booleanisRectangleprivate PointOnGeometryLocatorpiaprivate FastSegmentSetIntersectionFindersegIntFinder
-
Constructor Summary
Constructors Constructor Description PreparedPolygon(Polygonal poly)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(Geometry g)Default implementation.booleancontainsProperly(Geometry g)Default implementation.booleancovers(Geometry g)Default implementation.FastSegmentSetIntersectionFindergetIntersectionFinder()Gets the indexed intersection finder for this geometry.PointOnGeometryLocatorgetPointLocator()booleanintersects(Geometry g)Default implementation.-
Methods inherited from class org.locationtech.jts.geom.prep.BasicPreparedGeometry
coveredBy, crosses, disjoint, envelopeCovers, envelopesIntersect, getGeometry, getRepresentativePoints, isAnyTargetComponentInTest, overlaps, toString, touches, within
-
-
-
-
Field Detail
-
isRectangle
private final boolean isRectangle
-
segIntFinder
private FastSegmentSetIntersectionFinder segIntFinder
-
pia
private PointOnGeometryLocator pia
-
-
Constructor Detail
-
PreparedPolygon
public PreparedPolygon(Polygonal poly)
-
-
Method Detail
-
getIntersectionFinder
public FastSegmentSetIntersectionFinder getIntersectionFinder()
Gets the indexed intersection finder for this geometry.- Returns:
- the intersection finder
-
getPointLocator
public PointOnGeometryLocator getPointLocator()
-
intersects
public boolean intersects(Geometry g)
Description copied from class:BasicPreparedGeometryDefault implementation.- Specified by:
intersectsin interfacePreparedGeometry- Overrides:
intersectsin classBasicPreparedGeometry- Parameters:
g- the Geometry to test- Returns:
- true if this Geometry intersects the given Geometry
- See Also:
Geometry.intersects(Geometry)
-
contains
public boolean contains(Geometry g)
Description copied from class:BasicPreparedGeometryDefault implementation.- Specified by:
containsin interfacePreparedGeometry- Overrides:
containsin classBasicPreparedGeometry- Parameters:
g- the Geometry to test- Returns:
- true if this Geometry contains the given Geometry
- See Also:
Geometry.contains(Geometry)
-
containsProperly
public boolean containsProperly(Geometry g)
Description copied from class:BasicPreparedGeometryDefault implementation.- Specified by:
containsProperlyin interfacePreparedGeometry- Overrides:
containsProperlyin classBasicPreparedGeometry- Parameters:
g- the Geometry to test- Returns:
- true if this Geometry properly contains the given Geometry
- See Also:
Geometry.contains(org.locationtech.jts.geom.Geometry)
-
covers
public boolean covers(Geometry g)
Description copied from class:BasicPreparedGeometryDefault implementation.- Specified by:
coversin interfacePreparedGeometry- Overrides:
coversin classBasicPreparedGeometry- Parameters:
g- the Geometry to test- Returns:
- true if this Geometry covers the given Geometry
- See Also:
Geometry.covers(Geometry)
-
-