Class BoundingBox

  • All Implemented Interfaces:
    java.io.Serializable

    public final class BoundingBox
    extends EField
    A bounding box (usually shortened to bbox) is an area defined by two longitudes and two latitudes, where:
    • Latitude is a decimal number between -90.0 and 90.0.
    • Longitude is a decimal number between -180.0 and 180.0.
    Bounding box contains the minimum and maximum latitude and longitude values which define the four box corners.

    A bounding box is not an Open Street Map element and therefore has no associated unique identifier.

    Author:
    Charles W. Rapp
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  BoundingBox.Builder
      A Builder instance is the only was to create a BoundingBox instance.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.math.BigDecimal maxLatitude
      Maximum latitude sets the northern east-west boundary.
      java.math.BigDecimal maxLongitude
      Minimum longitude sets the eastern north-south boundary.
      java.math.BigDecimal minLatitude
      Minimum latitude sets the southern east-west boundary.
      java.math.BigDecimal minLongitude
      Minimum longitude sets the western north-south boundary.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static BoundingBox.Builder builder()
      Returns a new bounding box builder instance.
      java.lang.String toString()
      Returns text containing the four bounding box positions.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • minLatitude

        public final java.math.BigDecimal minLatitude
        Minimum latitude sets the southern east-west boundary.
      • maxLatitude

        public final java.math.BigDecimal maxLatitude
        Maximum latitude sets the northern east-west boundary.
      • minLongitude

        public final java.math.BigDecimal minLongitude
        Minimum longitude sets the western north-south boundary.
      • maxLongitude

        public final java.math.BigDecimal maxLongitude
        Minimum longitude sets the eastern north-south boundary.
    • Method Detail

      • toString

        public java.lang.String toString()
        Returns text containing the four bounding box positions.
        Overrides:
        toString in class java.lang.Object
        Returns:
        bounding box textual representation.
      • builder

        public static BoundingBox.Builder builder()
        Returns a new bounding box builder instance. It is recommended that a new builder instance be used to create a new bounding box and that builders should not be re-used.
        Returns:
        bounding box builder instance.