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:
  • 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 if bb is not a valid bounding box.

      Parameters:
      bb - The base bounding box
      bufferInMeters - The width of the buffer zone
      projection - 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 center
      bufferInMeters - The width of the buffer zone
      projection - 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 interface BoundingBoxHolder
    • getSouthLatitude

      public double getSouthLatitude()
      Specified by:
      getSouthLatitude in interface BoundingBoxHolder
    • getEastLongitude

      public double getEastLongitude()
      Specified by:
      getEastLongitude in interface BoundingBoxHolder
    • getWestLongitude

      public double getWestLongitude()
      Specified by:
      getWestLongitude in interface BoundingBoxHolder