Class GeoBounds

java.lang.Object
org.jxmapviewer.viewer.GeoBounds

public class GeoBounds
extends java.lang.Object
The GeoBounds class provides access the the North East and South West corners of the bounds and provides an intersects method.
  • Constructor Summary

    Constructors 
    Constructor Description
    GeoBounds​(double minLat, double minLng, double maxLat, double maxLng)
    Constructor.
    GeoBounds​(java.util.Set<GeoPosition> geoPositions)
    Constructor.
  • Method Summary

    Modifier and Type Method Description
    GeoPosition getCenter()  
    GeoPosition getNorthWest()
    Gets the north west position.
    GeoPosition getSouthEast()
    Gets the south east position.
    boolean intersects​(GeoBounds other)
    Determines if this bounds intersects the other bounds.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • 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​(java.util.Set<GeoPosition> geoPositions)
      Constructor.
      Parameters:
      geoPositions - A non null list of 2 or more different GeoBounds objects.
  • Method Details

    • 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.
    • getCenter

      public GeoPosition getCenter()
      Returns:
      the center of the bounds