Class GeoBounds


  • public class GeoBounds
    extends Object
    The GeoBounds class provides access the the North East and South West corners of the bounds and provides an intersects method.
    Author:
    Dan Andrews
    • Constructor Detail

      • GeoBounds

        public GeoBounds​(double minLat,
                         double minLng,
                         double maxLat,
                         double maxLng)
        Constructor.
        Parameters:
        minLat - The minimum latitude.
        minLng - The minimum longitude.
        maxLat - The maximum latitude.
        maxLng - The maximum longitude.
      • GeoBounds

        public GeoBounds​(Set<GeoPosition> geoPositions)
        Constructor.
        Parameters:
        geoPositions - A non null list of 2 or more different GeoBounds objects.
    • Method Detail

      • intersects

        public boolean intersects​(GeoBounds other)
        Determines if this bounds intersects the other bounds.
        Parameters:
        other - The other bounds to test for intersection with.
        Returns:
        Returns true if bounds intersect.
      • getNorthWest

        public GeoPosition getNorthWest()
        Gets the north west position.
        Returns:
        Returns the north west position.
      • getSouthEast

        public GeoPosition getSouthEast()
        Gets the south east position.
        Returns:
        Returns the south east position.