Class SpatialPredicate

java.lang.Object
org.locationtech.spatial4j.SpatialPredicate
All Implemented Interfaces:
Serializable

public abstract class SpatialPredicate extends Object implements Serializable
A predicate that compares a stored geometry to a supplied geometry. It's enum-like. For more explanation of each predicate, consider looking at the source implementation of evaluate(org.locationtech.spatial4j.shape.Shape, org.locationtech.spatial4j.shape.Shape). It's important to be aware that Lucene-spatial makes no distinction of shape boundaries, unlike many standardized definitions. Nor does it make dimensional distinctions (e.g. line vs polygon). You can lookup a predicate by "Covers" or "Contains", for example, and you will get the same underlying predicate implementation.
See Also:
  • Field Details

    • registry

      private static final Map<String,SpatialPredicate> registry
    • list

      private static final List<SpatialPredicate> list
    • BBoxIntersects

      public static final SpatialPredicate BBoxIntersects
      Bounding box of the *indexed* shape, then Intersects.
    • BBoxWithin

      public static final SpatialPredicate BBoxWithin
      Bounding box of the *indexed* shape, then IsWithin.
    • Contains

      public static final SpatialPredicate Contains
      Meets the "Covers" OGC definition (boundary-neutral).
    • Intersects

      public static final SpatialPredicate Intersects
      Meets the "Intersects" OGC definition.
    • IsEqualTo

      public static final SpatialPredicate IsEqualTo
      Meets the "Equals" OGC definition.
    • IsDisjointTo

      public static final SpatialPredicate IsDisjointTo
      Meets the "Disjoint" OGC definition.
    • IsWithin

      public static final SpatialPredicate IsWithin
      Meets the "CoveredBy" OGC definition (boundary-neutral).
    • Overlaps

      public static final SpatialPredicate Overlaps
      Almost meets the "Overlaps" OGC definition, but boundary-neutral (boundary==interior).
    • name

      private final String name
  • Constructor Details

    • SpatialPredicate

      protected SpatialPredicate(String name)
  • Method Details