Package org.elasticsearch.geo.geometry
Class Rectangle
- java.lang.Object
-
- org.elasticsearch.geo.geometry.Rectangle
-
-
Constructor Summary
Constructors Constructor Description Rectangle(double minLat, double maxLat, double minLon, double maxLon)Constructs a bounding box by first validating the provided latitude and longitude coordinatesRectangle(double minLat, double maxLat, double minLon, double maxLon, double minAlt, double maxAlt)Constructs a bounding box by first validating the provided latitude and longitude coordinates
-
Method Summary
Modifier and Type Method Description booleancontainsPoint(double lat, double lon)returns true if rectangle (defined by minLat, maxLat, minLon, maxLon) contains the lat lon pointbooleancrossesDateline()Returns true if this bounding box crosses the datelinebooleanequals(java.lang.Object o)doublegetHeight()doublegetMaxAlt()doublegetMaxLat()doublegetMaxLon()doublegetMinAlt()doublegetMinLat()doublegetMinLon()doublegetWidth()booleanhasAlt()inthashCode()booleanisEmpty()java.lang.StringtoString()ShapeTypetype()<T,E extends java.lang.Exception>
Tvisit(GeometryVisitor<T,E> visitor)
-
-
-
Field Detail
-
EMPTY
public static final Rectangle EMPTY
-
-
Constructor Detail
-
Rectangle
public Rectangle(double minLat, double maxLat, double minLon, double maxLon)Constructs a bounding box by first validating the provided latitude and longitude coordinates
-
Rectangle
public Rectangle(double minLat, double maxLat, double minLon, double maxLon, double minAlt, double maxAlt)Constructs a bounding box by first validating the provided latitude and longitude coordinates
-
-
Method Detail
-
getWidth
public double getWidth()
-
getHeight
public double getHeight()
-
getMinLat
public double getMinLat()
-
getMinLon
public double getMinLon()
-
getMinAlt
public double getMinAlt()
-
getMaxLat
public double getMaxLat()
-
getMaxLon
public double getMaxLon()
-
getMaxAlt
public double getMaxAlt()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
crossesDateline
public boolean crossesDateline()
Returns true if this bounding box crosses the dateline
-
containsPoint
public boolean containsPoint(double lat, double lon)returns true if rectangle (defined by minLat, maxLat, minLon, maxLon) contains the lat lon point
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
visit
public <T,E extends java.lang.Exception> T visit(GeometryVisitor<T,E> visitor) throws E extends java.lang.Exception
-
-