Groovy Documentation

org.jdesktop.swingx.mapviewer
[Java] Class GeoBounds

java.lang.Object
  org.jdesktop.swingx.mapviewer.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.

Authors:
Dan Andrews


Field Summary
private Rectangle2D[] rects

Internal representation of the bounds

 
Constructor Summary
GeoBounds(double minLat, double minLng, double maxLat, double maxLng)

Constructor.

GeoBounds(Set geoPositions)

Constructor.

 
Method Summary
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.

private void setRect(double minLat, double minLng, double maxLat, double maxLng)

Sets the internal rectangle representation.

 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Field Detail

rects

private Rectangle2D[] rects
Internal representation of the bounds


 
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 geoPositions)
Constructor.
Parameters:
geoPositions - A non null list of 2 or more different GeoBounds objects.


 
Method Detail

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.


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.


setRect

private void setRect(double minLat, double minLng, double maxLat, double maxLng)
Sets the internal rectangle representation.
Parameters:
minLat - The minimum latitude.
minLng - The minimum longitude.
maxLat - The maximum latitude.
maxLng - The maximum longitude.


 

Groovy Documentation