Class Rectangle

  • All Implemented Interfaces:
    Geometry

    public class Rectangle
    extends java.lang.Object
    implements Geometry
    Represents a lat/lon rectangle in decimal degrees.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static Rectangle EMPTY  
    • 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 coordinates
    • Field Detail

    • 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
    • Method Detail

      • getWidth

        public double getWidth()
      • getHeight

        public double getHeight()
      • getMinLat

        public double getMinLat()
      • getMinLon

        public double getMinLon()
      • getMaxLat

        public double getMaxLat()
      • getMaxLon

        public double getMaxLon()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • crossesDateline

        public boolean crossesDateline()
        Returns true if this bounding box crosses the dateline
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • isEmpty

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