Module org.elasticsearch.geo
Package org.elasticsearch.geometry.utils
Class SpatialEnvelopeVisitor.GeoPointVisitor
java.lang.Object
org.elasticsearch.geometry.utils.SpatialEnvelopeVisitor.GeoPointVisitor
- All Implemented Interfaces:
SpatialEnvelopeVisitor.PointVisitor
- Enclosing class:
SpatialEnvelopeVisitor
public static class SpatialEnvelopeVisitor.GeoPointVisitor
extends Object
implements SpatialEnvelopeVisitor.PointVisitor
The geographic point visitor determines the envelope by the minimum and maximum x/y coordinates,
while allowing for wrapping the longitude around the dateline.
When longitude wrapping is enabled, the visitor will determine the smallest bounding box between the two choices:
- Wrapping around the front of the earth, in which case the result will have minx < maxx
- Wrapping around the back of the earth, crossing the dateline, in which case the result will have minx > maxx
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubledoubledoubledoubledoublestatic RectanglegetResult(double top, double bottom, double negLeft, double negRight, double posLeft, double posRight, SpatialEnvelopeVisitor.WrapLongitude wrapLongitude) doublegetTop()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)
-
Field Details
-
top
protected double top -
bottom
protected double bottom -
negLeft
protected double negLeft -
negRight
protected double negRight -
posLeft
protected double posLeft -
posRight
protected double posRight
-
-
Constructor Details
-
GeoPointVisitor
-
-
Method Details
-
getTop
public double getTop() -
getBottom
public double getBottom() -
getNegLeft
public double getNegLeft() -
getNegRight
public double getNegRight() -
getPosLeft
public double getPosLeft() -
getPosRight
public double getPosRight() -
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
-
getResult
public static Rectangle getResult(double top, double bottom, double negLeft, double negRight, double posLeft, double posRight, SpatialEnvelopeVisitor.WrapLongitude wrapLongitude)
-