public class BoundingBox
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
int |
maxLatitudeE6
The maximum latitude value of this BoundingBox in microdegrees (degrees *
10^6).
|
int |
maxLongitudeE6
The maximum longitude value of this BoundingBox in microdegrees (degrees
* 10^6).
|
int |
minLatitudeE6
The minimum latitude value of this BoundingBox in microdegrees (degrees *
10^6).
|
int |
minLongitudeE6
The minimum longitude value of this BoundingBox in microdegrees (degrees
* 10^6).
|
| Constructor and Description |
|---|
BoundingBox(double minLatitude,
double minLongitude,
double maxLatitude,
double maxLongitude) |
BoundingBox(int minLatitudeE6,
int minLongitudeE6,
int maxLatitudeE6,
int maxLongitudeE6) |
BoundingBox(java.util.List<GeoPoint> geoPoints) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(GeoPoint geoPoint) |
boolean |
equals(java.lang.Object obj) |
BoundingBox |
extendBoundingBox(BoundingBox boundingBox) |
BoundingBox |
extendCoordinates(GeoPoint geoPoint)
Creates a BoundingBox extended up to
GeoPoint (but does not cross date line/poles). |
BoundingBox |
extendDegrees(double verticalExpansion,
double horizontalExpansion)
Creates a BoundingBox that is a fixed degree amount larger on all sides (but does not cross date line/poles).
|
BoundingBox |
extendMargin(float margin)
Creates a BoundingBox that is a fixed margin factor larger on all sides (but does not cross date line/poles).
|
BoundingBox |
extendMeters(int meters)
Creates a BoundingBox that is a fixed meter amount larger on all sides (but does not cross date line/poles).
|
java.lang.String |
format() |
GeoPoint |
getCenterPoint() |
double |
getLatitudeSpan() |
double |
getLongitudeSpan() |
double |
getMaxLatitude() |
double |
getMaxLongitude() |
double |
getMinLatitude() |
double |
getMinLongitude() |
int |
hashCode() |
boolean |
intersects(BoundingBox boundingBox) |
java.lang.String |
toString() |
public int maxLatitudeE6
public int maxLongitudeE6
public int minLatitudeE6
public int minLongitudeE6
public BoundingBox(int minLatitudeE6,
int minLongitudeE6,
int maxLatitudeE6,
int maxLongitudeE6)
minLatitudeE6 - the minimum latitude in microdegrees (degrees * 10^6).minLongitudeE6 - the minimum longitude in microdegrees (degrees * 10^6).maxLatitudeE6 - the maximum latitude in microdegrees (degrees * 10^6).maxLongitudeE6 - the maximum longitude in microdegrees (degrees * 10^6).public BoundingBox(double minLatitude,
double minLongitude,
double maxLatitude,
double maxLongitude)
minLatitude - the minimum latitude coordinate in degrees.minLongitude - the minimum longitude coordinate in degrees.maxLatitude - the maximum latitude coordinate in degrees.maxLongitude - the maximum longitude coordinate in degrees.public BoundingBox(java.util.List<GeoPoint> geoPoints)
geoPoints - the coordinates list.public boolean contains(GeoPoint geoPoint)
geoPoint - the point whose coordinates should be checked.public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic BoundingBox extendBoundingBox(BoundingBox boundingBox)
boundingBox - the BoundingBox which this BoundingBox should be extended if it is largerpublic BoundingBox extendCoordinates(GeoPoint geoPoint)
GeoPoint (but does not cross date line/poles).geoPoint - coordinates up to the extensionpublic BoundingBox extendDegrees(double verticalExpansion, double horizontalExpansion)
verticalExpansion - degree extension (must be >= 0)horizontalExpansion - degree extension (must be >= 0)public BoundingBox extendMargin(float margin)
margin - extension (must be > 0)public BoundingBox extendMeters(int meters)
meters - extension (must be >= 0)public java.lang.String format()
public GeoPoint getCenterPoint()
public double getLatitudeSpan()
public double getLongitudeSpan()
public double getMaxLatitude()
public double getMaxLongitude()
public double getMinLatitude()
public double getMinLongitude()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean intersects(BoundingBox boundingBox)
boundingBox - the BoundingBox which should be checked for intersection with this BoundingBox.public java.lang.String toString()
toString in class java.lang.Object