Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.vividsolutions.jts.geom.prep
Class PreparedPolygonContains

    java.lang.Object
      com.vividsolutions.jts.geom.prep.PreparedPolygonPredicate
          com.vividsolutions.jts.geom.prep.AbstractPreparedPolygonContains
              com.vividsolutions.jts.geom.prep.PreparedPolygonContains

public class PreparedPolygonContains
extends AbstractPreparedPolygonContains

Computes the `contains` 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

Field Summary

Fields inherited from class com.vividsolutions.jts.geom.prep.AbstractPreparedPolygonContains
`requireSomePointInInterior`

Fields inherited from class com.vividsolutions.jts.geom.prep.PreparedPolygonPredicate
`prepPoly`

Constructor Summary
`PreparedPolygonContains(PreparedPolygon prepPoly)` Creates an instance of this operation.

Method Summary
`boolean` | `contains(Geometry geom)` Tests whether this PreparedPolygon `contains` a given geometry.
`static boolean` | `contains(PreparedPolygon prep, Geometry geom)` Computes the contains predicate between a `PreparedPolygon` and a `Geometry`.
`protected boolean` | `fullTopologicalPredicate(Geometry geom)` Computes the full topological `contains` predicate.

Methods inherited from class com.vividsolutions.jts.geom.prep.AbstractPreparedPolygonContains
`eval`

Methods inherited from class com.vividsolutions.jts.geom.prep.PreparedPolygonPredicate
`isAllTestComponentsInTarget, isAllTestComponentsInTargetInterior, isAnyTargetComponentInAreaTest, isAnyTestComponentInTarget, isAnyTestComponentInTargetInterior`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PreparedPolygonContains

    public PreparedPolygonContains(PreparedPolygon prepPoly)

  Creates an instance of this operation.

Parameters:
  `prepPoly` - the PreparedPolygon to evaluate

Method Detail

### contains

    public static boolean contains(PreparedPolygon prep,
                                   Geometry geom)

  Computes the contains predicate between a `PreparedPolygon` and a `Geometry`.

  Parameters:
    `prep` - the prepared polygon
    `geom` - a test geometry
  Returns:
    true if the polygon contains the geometry

### contains

    public boolean contains(Geometry geom)

  Tests whether this PreparedPolygon `contains` a given geometry.

  Parameters:
    `geom` - the test geometry
  Returns:
    true if the test geometry is contained

### fullTopologicalPredicate

    protected boolean fullTopologicalPredicate(Geometry geom)

  Computes the full topological `contains` 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 contains the test geometry

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD