Class Rectangle

java.lang.Object
org.elasticsearch.geometry.Rectangle
All Implemented Interfaces:
Geometry

public class Rectangle extends Object implements Geometry
Represents a lat/lon rectangle in decimal degrees and optional altitude in meters.
  • Field Details

    • EMPTY

      public static final Rectangle EMPTY
  • 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

      public ShapeType type()
      Specified by:
      type in interface Geometry
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • visit

      public <T, E extends Exception> T visit(GeometryVisitor<T,E> visitor) throws E
      Specified by:
      visit in interface Geometry
      Throws:
      E extends Exception
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface Geometry
    • hasZ

      public boolean hasZ()
      Specified by:
      hasZ in interface Geometry