Class BoundingBox
-
Constructor Summary
ConstructorsConstructorDescriptionBoundingBox(Coord c, double rLat, double rLng) Creates a bounding box around a coordinate with a given radius.BoundingBox(Coord southWest, Coord northEast) Constructor with 2 coordinates for south west and north east -
Method Summary
Modifier and TypeMethodDescriptionbooleanindicates if the given coordinate is inside the counding boxstatic BoundingBoxcreate a smallest bounding box that contains all of the given coordinatesstatic BoundingBox/** create a smallest bounding box that contains all of the given coordinatesbooleanextend(BoundingBox other) create a new bounding box that extends this bounding box with the given bounding boxGets the north east coordinateGets the /south west coordinateinthashCode()doubleReturns
doubleReturns
booleanIndicates if this bounding box is isProjectedtoString()
-
Constructor Details
-
BoundingBox
Creates a bounding box around a coordinate with a given radius.
Parameters
-
c: The coordinate at the center of the bounding box. -
rLat: The latitude radius of the box (in degrees). -
rLng: The longitude radius of the box (in degrees).
-
-
BoundingBox
-
-
Method Details
-
create
create a smallest bounding box that contains all of the given coordinates
Parameters
coords: given coordinates to create a wrapping bounding box.
Returns
a bounding box that contains all of the coordinates
-
create
/** create a smallest bounding box that contains all of the given coordinates
Parameters
coords: given coordinates to create a wrapping bounding box.
Returns
a bounding box that contains all of the coordinates
-
getSouthWest
Gets the /south west coordinate -
getNorthEast
Gets the north east coordinate -
toString
-
latitudeDifference
public double latitudeDifference()Returns
The difference between SE and NW getLongitude in degrees.
-
longitudeDifference
public double longitudeDifference()Returns
The difference between SE and NW latitudes in degrees.
-
contains
indicates if the given coordinate is inside the counding box
Parameters
cur: coordinate to check
Returns
true if the given coordinate is contained in the bounding box
-
equals
-
hashCode
-
extend
create a new bounding box that extends this bounding box with the given bounding box
Parameters
other: a bounding box that needs to extends the current bounding box
Returns
a new bounding box that was extended from the current and the other
-
projected
public boolean projected()Indicates if this bounding box is isProjected
Returns
true if it's a isProjected bounding box
-