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 forPolygonal
geometries. This class supports bothPolygon
s andMultiPolygon
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.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
isRectangle
private PointOnGeometryLocator
pia
private FastSegmentSetIntersectionFinder
segIntFinder
-
Constructor Summary
Constructors Constructor Description PreparedPolygon(Polygonal poly)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.-
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:BasicPreparedGeometry
Default implementation.- Specified by:
intersects
in interfacePreparedGeometry
- Overrides:
intersects
in 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:BasicPreparedGeometry
Default implementation.- Specified by:
contains
in interfacePreparedGeometry
- Overrides:
contains
in 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:BasicPreparedGeometry
Default implementation.- Specified by:
containsProperly
in interfacePreparedGeometry
- Overrides:
containsProperly
in 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:BasicPreparedGeometry
Default implementation.- Specified by:
covers
in interfacePreparedGeometry
- Overrides:
covers
in classBasicPreparedGeometry
- Parameters:
g
- the Geometry to test- Returns:
- true if this Geometry covers the given Geometry
- See Also:
Geometry.covers(Geometry)
-
-