Class Rectangle

    • Field Detail

      • minLat

        public final double minLat
        maximum longitude value (in degrees)
      • minLon

        public final double minLon
        minimum longitude value (in degrees)
      • maxLat

        public final double maxLat
        maximum latitude value (in degrees)
      • maxLon

        public final double maxLon
        minimum latitude value (in degrees)
    • 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

      • crossesDateline

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

        public static Rectangle fromPointDistance(double centerLat,
                                                  double centerLon,
                                                  double radiusMeters)
        Compute Bounding Box for a circle using WGS-84 parameters
      • axisLat

        public static double axisLat(double centerLat,
                                     double radiusMeters)
        Calculate the latitude of a circle's intersections with its bbox meridians.

        NOTE: the returned value will be +/- AXISLAT_ERROR of the actual value.

        centerLat - The latitude of the circle center
        radiusMeters - The radius of the circle in meters
        A latitude