com.vividsolutions.jts.geom.prep
Class PreparedPolygonCovers
java.lang.Object
com.vividsolutions.jts.geom.prep.PreparedPolygonPredicate
com.vividsolutions.jts.geom.prep.AbstractPreparedPolygonContains
com.vividsolutions.jts.geom.prep.PreparedPolygonCovers
- public class PreparedPolygonCovers
- extends AbstractPreparedPolygonContains
Computes the covers spatial relationship predicate
for a PreparedPolygon
relative to all other Geometry
classes.
Uses short-circuit tests and indexing to improve performance.
It is not possible to short-circuit in all cases, in particular
in the case where the test geometry touches the polygon linework.
In this case full topology must be computed.
- Author:
- Martin Davis
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PreparedPolygonCovers
public PreparedPolygonCovers(PreparedPolygon prepPoly)
- Creates an instance of this operation.
- Parameters:
prepPoly
- the PreparedPolygon to evaluate
covers
public static boolean covers(PreparedPolygon prep,
Geometry geom)
- Computes the covers predicate between a
PreparedPolygon
and a Geometry
.
- Parameters:
prep
- the prepared polygongeom
- a test geometry
- Returns:
- true if the polygon covers the geometry
covers
public boolean covers(Geometry geom)
- Tests whether this PreparedPolygon covers a given geometry.
- Parameters:
geom
- the test geometry
- Returns:
- true if the test geometry is covered
fullTopologicalPredicate
protected boolean fullTopologicalPredicate(Geometry geom)
- Computes the full topological covers predicate.
Used when short-circuit tests are not conclusive.
- Specified by:
fullTopologicalPredicate
in class AbstractPreparedPolygonContains
- Parameters:
geom
- the test geometry
- Returns:
- true if this prepared polygon covers the test geometry