Class BoundingBox
java.lang.Object
com.here.platform.location.core.geospatial.BoundingBox
- All Implemented Interfaces:
BoundingBoxHolder,Serializable,scala.Equals,scala.Product
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 TypeMethodDescriptiondoublestatic <BB> BoundingBoxfromBoundingBoxWithBuffer(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> BoundingBoxfromCenterAndBuffer(GC coord, double bufferInMeters, GeoProjection projection, GeoCoordinateOperations<GC> evidence$2) Creates a bounding box expanded towards all directions from the given point.doubledoubledoubledoubledoubledoubledoubleMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface scala.Equals
canEqual, equalsMethods inherited from interface scala.Product
productArity, productElement, productElementName, productElementNames, 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
IllegalArgumentExceptionifbbis not a validbounding 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:
getNorthLatitudein interfaceBoundingBoxHolder
-
getSouthLatitude
public double getSouthLatitude()- Specified by:
getSouthLatitudein interfaceBoundingBoxHolder
-
getEastLongitude
public double getEastLongitude()- Specified by:
getEastLongitudein interfaceBoundingBoxHolder
-
getWestLongitude
public double getWestLongitude()- Specified by:
getWestLongitudein interfaceBoundingBoxHolder
-