Module org.elasticsearch.geo
Package org.elasticsearch.geometry.utils
Class SpatialEnvelopeVisitor.CartesianPointVisitor
java.lang.Object
org.elasticsearch.geometry.utils.SpatialEnvelopeVisitor.CartesianPointVisitor
- All Implemented Interfaces:
SpatialEnvelopeVisitor.PointVisitor
- Enclosing class:
SpatialEnvelopeVisitor
public static class SpatialEnvelopeVisitor.CartesianPointVisitor
extends Object
implements SpatialEnvelopeVisitor.PointVisitor
The cartesian point visitor determines the envelope by the minimum and maximum x/y coordinates.
It also disallows invalid rectangles where minX > maxX.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublegetMaxX()doublegetMaxY()doublegetMinX()doublegetMinY()booleanisValid()voidreset()To allow for memory optimizations through object reuse, the visitor can be reset to its initial state.voidvisitPoint(double x, double y) voidvisitRectangle(double minX, double maxX, double maxY, double minY)
-
Constructor Details
-
CartesianPointVisitor
public CartesianPointVisitor()
-
-
Method Details
-
getMinX
public double getMinX() -
getMaxX
public double getMaxX() -
getMaxY
public double getMaxY() -
getMinY
public double getMinY() -
visitPoint
public void visitPoint(double x, double y) - Specified by:
visitPointin interfaceSpatialEnvelopeVisitor.PointVisitor
-
visitRectangle
public void visitRectangle(double minX, double maxX, double maxY, double minY) - Specified by:
visitRectanglein interfaceSpatialEnvelopeVisitor.PointVisitor
-
isValid
public boolean isValid()- Specified by:
isValidin interfaceSpatialEnvelopeVisitor.PointVisitor
-
getResult
- Specified by:
getResultin interfaceSpatialEnvelopeVisitor.PointVisitor
-
reset
public void reset()Description copied from interface:SpatialEnvelopeVisitor.PointVisitorTo allow for memory optimizations through object reuse, the visitor can be reset to its initial state.- Specified by:
resetin interfaceSpatialEnvelopeVisitor.PointVisitor
-