Package org.jxmapviewer.viewer
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 GeoPositiongetCenter()GeoPositiongetNorthWest()Gets the north west position.GeoPositiongetSouthEast()Gets the south east position.booleanintersects(GeoBounds other)Determines if this bounds intersects the other bounds.
-
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
Constructor.- Parameters:
geoPositions- A non null list of 2 or more differentGeoBoundsobjects.
-
-
Method Details
-
intersects
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
Gets the north west position.- Returns:
- Returns the north west position.
-
getSouthEast
Gets the south east position.- Returns:
- Returns the south east position.
-
getCenter
- Returns:
- the center of the bounds
-