Package org.locationtech.jts.geom.prep
Class PreparedPolygonPredicate
- java.lang.Object
-
- org.locationtech.jts.geom.prep.PreparedPolygonPredicate
-
- Direct Known Subclasses:
AbstractPreparedPolygonContains
,PreparedPolygonContainsProperly
,PreparedPolygonIntersects
abstract class PreparedPolygonPredicate extends java.lang.Object
A base class for predicate operations onPreparedPolygon
s.
-
-
Field Summary
Fields Modifier and Type Field Description protected PreparedPolygon
prepPoly
private PointOnGeometryLocator
targetPointLocator
-
Constructor Summary
Constructors Constructor Description PreparedPolygonPredicate(PreparedPolygon prepPoly)
Creates an instance of this operation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
isAllTestComponentsInTarget(Geometry testGeom)
Tests whether all components of the test Geometry are contained in the target geometry.protected boolean
isAllTestComponentsInTargetInterior(Geometry testGeom)
Tests whether all components of the test Geometry are contained in the interior of the target geometry.protected boolean
isAnyTargetComponentInAreaTest(Geometry testGeom, java.util.List targetRepPts)
Tests whether any component of the target geometry intersects the test geometry (which must be an areal geometry)protected boolean
isAnyTestComponentInTarget(Geometry testGeom)
Tests whether any component of the test Geometry intersects the area of the target geometry.protected boolean
isAnyTestComponentInTargetInterior(Geometry testGeom)
Tests whether any component of the test Geometry intersects the interior of the target geometry.
-
-
-
Field Detail
-
prepPoly
protected PreparedPolygon prepPoly
-
targetPointLocator
private PointOnGeometryLocator targetPointLocator
-
-
Constructor Detail
-
PreparedPolygonPredicate
public PreparedPolygonPredicate(PreparedPolygon prepPoly)
Creates an instance of this operation.- Parameters:
prepPoly
- the PreparedPolygon to evaluate
-
-
Method Detail
-
isAllTestComponentsInTarget
protected boolean isAllTestComponentsInTarget(Geometry testGeom)
Tests whether all components of the test Geometry are contained in the target geometry. Handles both linear and point components.- Parameters:
geom
- a geometry to test- Returns:
- true if all components of the argument are contained in the target geometry
-
isAllTestComponentsInTargetInterior
protected boolean isAllTestComponentsInTargetInterior(Geometry testGeom)
Tests whether all components of the test Geometry are contained in the interior of the target geometry. Handles both linear and point components.- Parameters:
geom
- a geometry to test- Returns:
- true if all components of the argument are contained in the target geometry interior
-
isAnyTestComponentInTarget
protected boolean isAnyTestComponentInTarget(Geometry testGeom)
Tests whether any component of the test Geometry intersects the area of the target geometry. Handles test geometries with both linear and point components.- Parameters:
geom
- a geometry to test- Returns:
- true if any component of the argument intersects the prepared area geometry
-
isAnyTestComponentInTargetInterior
protected boolean isAnyTestComponentInTargetInterior(Geometry testGeom)
Tests whether any component of the test Geometry intersects the interior of the target geometry. Handles test geometries with both linear and point components.- Parameters:
geom
- a geometry to test- Returns:
- true if any component of the argument intersects the prepared area geometry interior
-
isAnyTargetComponentInAreaTest
protected boolean isAnyTargetComponentInAreaTest(Geometry testGeom, java.util.List targetRepPts)
Tests whether any component of the target geometry intersects the test geometry (which must be an areal geometry)- Parameters:
geom
- the test geometryrepPts
- the representative points of the target geometry- Returns:
- true if any component intersects the areal test geometry
-
-