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 TypeMethodDescriptiondouble
double
double
double
double
static Rectangle
getResult
(double top, double bottom, double negLeft, double negRight, double posLeft, double posRight, SpatialEnvelopeVisitor.WrapLongitude wrapLongitude) double
getTop()
boolean
isValid()
void
reset()
To allow for memory optimizations through object reuse, the visitor can be reset to its initial state.void
visitPoint
(double x, double y) void
visitRectangle
(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:
visitPoint
in interfaceSpatialEnvelopeVisitor.PointVisitor
-
visitRectangle
public void visitRectangle(double minX, double maxX, double maxY, double minY) - Specified by:
visitRectangle
in interfaceSpatialEnvelopeVisitor.PointVisitor
-
isValid
public boolean isValid()- Specified by:
isValid
in interfaceSpatialEnvelopeVisitor.PointVisitor
-
getResult
- Specified by:
getResult
in interfaceSpatialEnvelopeVisitor.PointVisitor
-
reset
public void reset()Description copied from interface:SpatialEnvelopeVisitor.PointVisitor
To allow for memory optimizations through object reuse, the visitor can be reset to its initial state.- Specified by:
reset
in interfaceSpatialEnvelopeVisitor.PointVisitor
-
getResult
public static Rectangle getResult(double top, double bottom, double negLeft, double negRight, double posLeft, double posRight, SpatialEnvelopeVisitor.WrapLongitude wrapLongitude)
-