Package nl.bebr.mapviewer.data
Class GeoBounds
- java.lang.Object
-
- nl.bebr.mapviewer.data.GeoBounds
-
public class GeoBounds extends Object
TheGeoBoundsclass provides access the the North East and South West corners of the bounds and provides an intersects method.- Author:
- Dan Andrews
-
-
Constructor Summary
Constructors Constructor Description GeoBounds(double minLat, double minLng, double maxLat, double maxLng)Constructor.GeoBounds(Set<GeoPosition> geoPositions)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GeoPositiongetNorthWest()Gets the north west position.GeoPositiongetSouthEast()Gets the south east position.booleanintersects(GeoBounds other)Determines if this bounds intersects the other 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<GeoPosition> geoPositions)
Constructor.- Parameters:
geoPositions- A non null list of 2 or more differentGeoBoundsobjects.
-
-
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.
-
-