java.lang.Object
org.elasticsearch.lucene.spatial.TriangleTreeVisitor.TriangleTreeDecodedVisitor
org.elasticsearch.lucene.spatial.Component2DVisitor
- All Implemented Interfaces:
TriangleTreeVisitor
A
TriangleTreeVisitor.TriangleTreeDecodedVisitor
implementation for Component2D
geometries.
It can solve spatial relationships against a serialize triangle tree.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.lucene.spatial.TriangleTreeVisitor
TriangleTreeVisitor.TriangleTreeDecodedVisitor
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic Component2DVisitor
getVisitor
(org.apache.lucene.geo.Component2D component2D, org.apache.lucene.document.ShapeField.QueryRelation relation, CoordinateEncoder encoder) Creates a visitor from the provided Component2D and spatial relationship.abstract boolean
matches()
If the relationship has been honour.protected boolean
pushDecoded
(double maxX, double maxY) Equivalent toTriangleTreeVisitor.TriangleTreeDecodedVisitor.push(int, int)
but coordinates are decoded.protected boolean
pushDecoded
(double minX, double minY, double maxX, double maxY) Equivalent toTriangleTreeVisitor.TriangleTreeDecodedVisitor.push(int, int, int, int)
but coordinates are decoded.protected abstract boolean
pushDecoded
(org.apache.lucene.index.PointValues.Relation relation) Relation between the query shape and the doc value bounding box.protected boolean
pushDecodedX
(double minX) Equivalent toTriangleTreeVisitor.TriangleTreeDecodedVisitor.pushX(int)
but coordinates are decoded.protected boolean
pushDecodedY
(double minY) Equivalent toTriangleTreeVisitor.TriangleTreeDecodedVisitor.pushY(int)
but coordinates are decoded.abstract void
reset()
Reset the visitor to the initial state.Methods inherited from class org.elasticsearch.lucene.spatial.TriangleTreeVisitor.TriangleTreeDecodedVisitor
push, push, pushX, pushY, visitDecodedLine, visitDecodedPoint, visitDecodedTriangle, visitLine, visitPoint, visitTriangle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.elasticsearch.lucene.spatial.TriangleTreeVisitor
push
-
Field Details
-
component2D
protected final org.apache.lucene.geo.Component2D component2D
-
-
Method Details
-
matches
public abstract boolean matches()If the relationship has been honour. -
reset
public abstract void reset()Reset the visitor to the initial state. -
pushDecodedX
protected boolean pushDecodedX(double minX) Description copied from class:TriangleTreeVisitor.TriangleTreeDecodedVisitor
Equivalent toTriangleTreeVisitor.TriangleTreeDecodedVisitor.pushX(int)
but coordinates are decoded.- Specified by:
pushDecodedX
in classTriangleTreeVisitor.TriangleTreeDecodedVisitor
-
pushDecodedY
protected boolean pushDecodedY(double minY) Description copied from class:TriangleTreeVisitor.TriangleTreeDecodedVisitor
Equivalent toTriangleTreeVisitor.TriangleTreeDecodedVisitor.pushY(int)
but coordinates are decoded.- Specified by:
pushDecodedY
in classTriangleTreeVisitor.TriangleTreeDecodedVisitor
-
pushDecoded
protected boolean pushDecoded(double maxX, double maxY) Description copied from class:TriangleTreeVisitor.TriangleTreeDecodedVisitor
Equivalent toTriangleTreeVisitor.TriangleTreeDecodedVisitor.push(int, int)
but coordinates are decoded.- Specified by:
pushDecoded
in classTriangleTreeVisitor.TriangleTreeDecodedVisitor
-
pushDecoded
protected boolean pushDecoded(double minX, double minY, double maxX, double maxY) Description copied from class:TriangleTreeVisitor.TriangleTreeDecodedVisitor
Equivalent toTriangleTreeVisitor.TriangleTreeDecodedVisitor.push(int, int, int, int)
but coordinates are decoded.- Specified by:
pushDecoded
in classTriangleTreeVisitor.TriangleTreeDecodedVisitor
-
pushDecoded
protected abstract boolean pushDecoded(org.apache.lucene.index.PointValues.Relation relation) Relation between the query shape and the doc value bounding box. Depending on the query relationship, decide if we should traverse the tree.- Returns:
- if true, the visitor keeps traversing the tree, else it stops.
-
getVisitor
public static Component2DVisitor getVisitor(org.apache.lucene.geo.Component2D component2D, org.apache.lucene.document.ShapeField.QueryRelation relation, CoordinateEncoder encoder) Creates a visitor from the provided Component2D and spatial relationship. Visitors are re-usable by calling thereset()
method.
-