org.apache.lucene.spatial.query

## Class SpatialOperation

- java.lang.Object
- - org.apache.lucene.spatial.query.SpatialOperation

- All Implemented Interfaces:
    Serializable

      public abstract class SpatialOperation
      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:
    DE-9IM at Wikipedia, based on OGC specs, ESRIs docs on spatial relations, Serialized Form
  WARNING: This API is experimental and might change in incompatible ways in the next release.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static SpatialOperation` | `BBoxIntersects` Bounding box of the *indexed* shape, then `Intersects`.
    `static SpatialOperation` | `BBoxWithin` Bounding box of the *indexed* shape, then `IsWithin`.
    `static SpatialOperation` | `Contains` Meets the "Covers" OGC definition (boundary-neutral).
    `static SpatialOperation` | `Intersects` Meets the "Intersects" OGC definition.
    `static SpatialOperation` | `IsDisjointTo` Meets the "Disjoint" OGC definition.
    `static SpatialOperation` | `IsEqualTo` Meets the "Equals" OGC definition.
    `static SpatialOperation` | `IsWithin` Meets the "CoveredBy" OGC definition (boundary-neutral).
    `static SpatialOperation` | `Overlaps` Almost meets the "Overlaps" OGC definition, but boundary-neutral (boundary==interior).

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `SpatialOperation(String name)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract boolean` | `evaluate(org.locationtech.spatial4j.shape.Shape indexedShape, org.locationtech.spatial4j.shape.Shape queryShape)` Returns whether the relationship between indexedShape and queryShape is satisfied by this operation.
    `static SpatialOperation` | `get(String v)`
    `String` | `getName()`
    `static boolean` | `is(SpatialOperation op, SpatialOperation... tst)`
    `protected void` | `register(String name)`
    `String` | `toString()`
    `static List<SpatialOperation>` | `values()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### BBoxIntersects

          public static final SpatialOperation BBoxIntersects

      Bounding box of the *indexed* shape, then `Intersects`.

    - #### BBoxWithin

          public static final SpatialOperation BBoxWithin

      Bounding box of the *indexed* shape, then `IsWithin`.

    - #### Contains

          public static final SpatialOperation Contains

      Meets the "Covers" OGC definition (boundary-neutral).

    - #### Intersects

          public static final SpatialOperation Intersects

      Meets the "Intersects" OGC definition.

    - #### IsEqualTo

          public static final SpatialOperation IsEqualTo

      Meets the "Equals" OGC definition.

    - #### IsDisjointTo

          public static final SpatialOperation IsDisjointTo

      Meets the "Disjoint" OGC definition.

    - #### IsWithin

          public static final SpatialOperation IsWithin

      Meets the "CoveredBy" OGC definition (boundary-neutral).

    - #### Overlaps

          public static final SpatialOperation Overlaps

      Almost meets the "Overlaps" OGC definition, but boundary-neutral (boundary==interior).

  - ### Constructor Detail

    - #### SpatialOperation

          protected SpatialOperation(String name)

  - ### Method Detail

    - #### register

          protected void register(String name)

    - #### get

          public static SpatialOperation get(String v)

    - #### values

          public static List<SpatialOperation> values()

    - #### is

          public static boolean is(SpatialOperation op,
                                   SpatialOperation... tst)

    - #### evaluate

          public abstract boolean evaluate(org.locationtech.spatial4j.shape.Shape indexedShape,
                                           org.locationtech.spatial4j.shape.Shape queryShape)

      Returns whether the relationship between indexedShape and queryShape is satisfied by this operation.

    - #### getName

          public String getName()

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.