Package 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 ofevaluate(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.
-
-
Field Summary
Fields Modifier and Type Field Description static SpatialOperationBBoxIntersectsBounding box of the *indexed* shape, thenIntersects.static SpatialOperationBBoxWithinBounding box of the *indexed* shape, thenIsWithin.static SpatialOperationContainsMeets the "Covers" OGC definition (boundary-neutral).static SpatialOperationIntersectsMeets the "Intersects" OGC definition.static SpatialOperationIsDisjointToMeets the "Disjoint" OGC definition.static SpatialOperationIsEqualToMeets the "Equals" OGC definition.static SpatialOperationIsWithinMeets the "CoveredBy" OGC definition (boundary-neutral).static SpatialOperationOverlapsAlmost meets the "Overlaps" OGC definition, but boundary-neutral (boundary==interior).
-
Constructor Summary
Constructors Modifier Constructor Description protectedSpatialOperation(String name)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract booleanevaluate(Shape indexedShape, Shape queryShape)Returns whether the relationship between indexedShape and queryShape is satisfied by this operation.static SpatialOperationget(String v)StringgetName()static booleanis(SpatialOperation op, SpatialOperation... tst)protected voidregister(String name)StringtoString()static List<SpatialOperation>values()
-
-
-
Field Detail
-
BBoxIntersects
public static final SpatialOperation BBoxIntersects
Bounding box of the *indexed* shape, thenIntersects.
-
BBoxWithin
public static final SpatialOperation BBoxWithin
Bounding box of the *indexed* shape, thenIsWithin.
-
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(Shape indexedShape, Shape queryShape)
Returns whether the relationship between indexedShape and queryShape is satisfied by this operation.
-
getName
public String getName()
-
-