Interface IBounds

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default boolean contains​(ILatLon ll)
      Determines if the given point ll is within these bounds.
      default boolean contains​(IBounds b)
      Tests, whether the bbox b lies completely inside this bbox.
      default boolean crosses180thMeridian()
      Determines if this Bounds object crosses the 180th Meridian.
      default double getArea()
      Gets the area of this bounds (in lat/lon space)
      ILatLon getCenter()
      Returns center of the bounding box.
      double getHeight()
      Returns the bounds width.
      default ILatLon getMax()
      Gets the point that has both the maximum lat and lon coordinate
      double getMaxLat()
      Returns max latitude of bounds.
      double getMaxLon()
      Returns max longitude of bounds.
      default ILatLon getMin()
      Gets the point that has both the minimal lat and lon coordinate
      double getMinLat()
      Returns min latitude of bounds.
      double getMinLon()
      Returns min longitude of bounds.
      double getWidth()
      Returns the bounds width.
      default boolean intersects​(IBounds b)
      The two bounds intersect? Compared to java Shape.intersects, if does not use the interior but the closure.
      default boolean isValid()
      Determines if the bbox covers a part of the planet surface.
    • Method Detail

      • getMin

        default ILatLon getMin()
        Gets the point that has both the minimal lat and lon coordinate
        Returns:
        The point
      • getMinLat

        double getMinLat()
        Returns min latitude of bounds. Efficient shortcut for getMin().lat().
        Returns:
        min latitude of bounds.
      • getMinLon

        double getMinLon()
        Returns min longitude of bounds. Efficient shortcut for getMin().lon().
        Returns:
        min longitude of bounds.
      • getMax

        default ILatLon getMax()
        Gets the point that has both the maximum lat and lon coordinate
        Returns:
        The point
      • getMaxLat

        double getMaxLat()
        Returns max latitude of bounds. Efficient shortcut for getMax().lat().
        Returns:
        max latitude of bounds.
      • getMaxLon

        double getMaxLon()
        Returns max longitude of bounds. Efficient shortcut for getMax().lon().
        Returns:
        max longitude of bounds.
      • getCenter

        ILatLon getCenter()
        Returns center of the bounding box.
        Returns:
        Center of the bounding box.
      • contains

        default boolean contains​(ILatLon ll)
        Determines if the given point ll is within these bounds.

        Points with unknown coordinates are always outside the coordinates.

        Parameters:
        ll - The lat/lon to check
        Returns:
        true if ll is within these bounds, false otherwise
      • contains

        default boolean contains​(IBounds b)
        Tests, whether the bbox b lies completely inside this bbox.
        Parameters:
        b - bounding box
        Returns:
        true if b lies completely inside this bbox
      • intersects

        default boolean intersects​(IBounds b)
        The two bounds intersect? Compared to java Shape.intersects, if does not use the interior but the closure. (">=" instead of ">")
        Parameters:
        b - other bounds
        Returns:
        true if the two bounds intersect
      • getHeight

        double getHeight()
        Returns the bounds width.
        Returns:
        the bounds width
      • getWidth

        double getWidth()
        Returns the bounds width.
        Returns:
        the bounds width
      • getArea

        default double getArea()
        Gets the area of this bounds (in lat/lon space)
        Returns:
        The area
      • isValid

        default boolean isValid()
        Determines if the bbox covers a part of the planet surface.
        Returns:
        true if the bbox covers a part of the planet surface. Height and width must be non-negative, but may (both) be 0.
      • crosses180thMeridian

        default boolean crosses180thMeridian()
        Determines if this Bounds object crosses the 180th Meridian. See http://wiki.openstreetmap.org/wiki/180th_meridian
        Returns:
        true if this Bounds object crosses the 180th Meridian.