Package org.locationtech.spatial4j
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 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 SpatialPredicate
BBoxIntersects
Bounding box of the *indexed* shape, thenIntersects
.static SpatialPredicate
BBoxWithin
Bounding box of the *indexed* shape, thenIsWithin
.static SpatialPredicate
Contains
Meets the "Covers" OGC definition (boundary-neutral).static SpatialPredicate
Intersects
Meets the "Intersects" OGC definition.static SpatialPredicate
IsDisjointTo
Meets the "Disjoint" OGC definition.static SpatialPredicate
IsEqualTo
Meets the "Equals" OGC definition.static SpatialPredicate
IsWithin
Meets the "CoveredBy" OGC definition (boundary-neutral).static SpatialPredicate
Overlaps
Almost meets the "Overlaps" OGC definition, but boundary-neutral (boundary==interior).
-
Constructor Summary
Constructors Modifier Constructor Description protected
SpatialPredicate(String name)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract boolean
evaluate(Shape indexedShape, Shape queryShape)
Returns whether the relationship between indexedShape and queryShape is satisfied by this operation.static SpatialPredicate
get(String v)
String
getName()
static boolean
is(SpatialPredicate op, SpatialPredicate... tst)
protected void
register(String name)
String
toString()
static List<SpatialPredicate>
values()
-
-
-
Field Detail
-
BBoxIntersects
public static final SpatialPredicate BBoxIntersects
Bounding box of the *indexed* shape, thenIntersects
.
-
BBoxWithin
public static final SpatialPredicate BBoxWithin
Bounding box of the *indexed* shape, thenIsWithin
.
-
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).
-
-
Constructor Detail
-
SpatialPredicate
protected SpatialPredicate(String name)
-
-
Method Detail
-
register
protected void register(String name)
-
get
public static SpatialPredicate get(String v)
-
values
public static List<SpatialPredicate> values()
-
is
public static boolean is(SpatialPredicate op, SpatialPredicate... 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()
-
-