Package org.elasticsearch.geometry
Class Rectangle
java.lang.Object
org.elasticsearch.geometry.Rectangle
- All Implemented Interfaces:
Geometry
public class Rectangle extends java.lang.Object implements Geometry
Represents a lat/lon rectangle in decimal degrees and optional altitude in meters.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description Rectangle(double minX, double maxX, double maxY, double minY)Constructs a bounding box by first validating the provided latitude and longitude coordinatesRectangle(double minX, double maxX, double maxY, double minY, double minZ, double maxZ)Constructs a bounding box by first validating the provided latitude and longitude coordinates -
Method Summary
Modifier and Type Method Description booleanequals(java.lang.Object o)doublegetMaxAlt()doublegetMaxLat()doublegetMaxLon()doublegetMaxX()doublegetMaxY()doublegetMaxZ()doublegetMinAlt()doublegetMinLat()doublegetMinLon()doublegetMinX()doublegetMinY()doublegetMinZ()inthashCode()booleanhasZ()booleanisEmpty()java.lang.StringtoString()ShapeTypetype()<T, E extends java.lang.Exception>
Tvisit(GeometryVisitor<T,E> visitor)
-
Field Details
-
Constructor Details
-
Rectangle
public Rectangle(double minX, double maxX, double maxY, double minY)Constructs a bounding box by first validating the provided latitude and longitude coordinates -
Rectangle
public Rectangle(double minX, double maxX, double maxY, double minY, double minZ, double maxZ)Constructs a bounding box by first validating the provided latitude and longitude coordinates
-
-
Method Details
-
getMinY
public double getMinY() -
getMinX
public double getMinX() -
getMinZ
public double getMinZ() -
getMaxY
public double getMaxY() -
getMaxX
public double getMaxX() -
getMaxZ
public double getMaxZ() -
getMinLat
public double getMinLat() -
getMinLon
public double getMinLon() -
getMinAlt
public double getMinAlt() -
getMaxLat
public double getMaxLat() -
getMaxLon
public double getMaxLon() -
getMaxAlt
public double getMaxAlt() -
type
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
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 -
isEmpty
public boolean isEmpty() -
hasZ
public boolean hasZ()
-