Class BoundingBox
java.lang.Object
com.here.platform.location.core.geospatial.BoundingBox
- All Implemented Interfaces:
BoundingBoxHolder
,Serializable
,scala.Equals
,scala.Product
,scala.Serializable
public class BoundingBox
extends Object
implements BoundingBoxHolder, scala.Product, scala.Serializable
The common return type for bounding boxes.
param: northLatitude in degrees param: southLatitude in degrees param: eastLongitude in degrees param: westLongitude in degrees
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionBoundingBox
(double northLatitude, double southLatitude, double eastLongitude, double westLongitude) -
Method Summary
Modifier and TypeMethodDescriptiondouble
static <BB> BoundingBox
fromBoundingBoxWithBuffer
(BB bb, double bufferInMeters, GeoProjection projection, BoundingBoxOperations<BB> evidence$1) Creates a bounding box expanded by a buffer zone towards all directions from the bounding box center.static <GC> BoundingBox
fromCenterAndBuffer
(GC coord, double bufferInMeters, GeoProjection projection, GeoCoordinateOperations<GC> evidence$2) Creates a bounding box expanded towards all directions from the given point.double
double
double
double
double
double
double
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface scala.Equals
canEqual, equals
Methods inherited from interface scala.Product
productArity, productElement, productIterator, productPrefix
-
Constructor Details
-
BoundingBox
public BoundingBox(double northLatitude, double southLatitude, double eastLongitude, double westLongitude)
-
-
Method Details
-
fromBoundingBoxWithBuffer
public static <BB> BoundingBox fromBoundingBoxWithBuffer(BB bb, double bufferInMeters, GeoProjection projection, BoundingBoxOperations<BB> evidence$1) Creates a bounding box expanded by a buffer zone towards all directions from the bounding box center.Please note that for accurate results the location of the bounding box and the size of the buffer needs to be compatible with the used projection.
Throws an
IllegalArgumentException
ifbb
is not a valid
bounding box.- Parameters:
bb
- The base bounding boxbufferInMeters
- The width of the buffer zoneprojection
- The projection to use- Returns:
- A bounding box expanded by the buffer zone
- Type Parameters:
- BB The type of bounding box to expand to use
-
fromCenterAndBuffer
public static <GC> BoundingBox fromCenterAndBuffer(GC coord, double bufferInMeters, GeoProjection projection, GeoCoordinateOperations<GC> evidence$2) Creates a bounding box expanded towards all directions from the given point.- Parameters:
coord
- The bounding box centerbufferInMeters
- The width of the buffer zoneprojection
- The projection to use- Returns:
- A bounding box expanded by the buffer zone
-
northLatitude
public double northLatitude() -
southLatitude
public double southLatitude() -
eastLongitude
public double eastLongitude() -
westLongitude
public double westLongitude() -
getNorthLatitude
public double getNorthLatitude()- Specified by:
getNorthLatitude
in interfaceBoundingBoxHolder
-
getSouthLatitude
public double getSouthLatitude()- Specified by:
getSouthLatitude
in interfaceBoundingBoxHolder
-
getEastLongitude
public double getEastLongitude()- Specified by:
getEastLongitude
in interfaceBoundingBoxHolder
-
getWestLongitude
public double getWestLongitude()- Specified by:
getWestLongitude
in interfaceBoundingBoxHolder
-