BDBoundingBox

@interface BDBoundingBox : BDGeometry <NSCopying, BDPValidatable, NSCoding>

@brief A rectangular coordinate region on the Earth’s surface, defined by two latitude / longitude corner @ref BDPoint “points”.

\image html boundingBox.gif

@copyright Bluedot Innovation

  • Initializes a BDBoundingBox with individual values for the four bounding edges, in degrees.

    Declaration

    Objective-C

    - (instancetype)initWithNorth:(BDLocationDegrees)north
                             west:(BDLocationDegrees)west
                            south:(BDLocationDegrees)south
                             east:(BDLocationDegrees)east;
  • Initializes a BDBoundingBox with @ref BDPoint values for two of the bounding corners.

    Declaration

    Objective-C

    - (instancetype)initWithNorthEast:(BDPoint *)northEast
                            southWest:(BDPoint *)southWest;
  • Initializes a BDBoundingBox using a MapKit coordinate region.

    Declaration

    Objective-C

    - (instancetype)initWithCoordinateRegion:(MKCoordinateRegion)region;
  • @returns the equivalent MapKit coordinate region representation of this rectangular region.

    Declaration

    Objective-C

    - (MKCoordinateRegion)coordinateRegion;
  • Declaration

    Objective-C

    - (void)setWest:(BDLocationDegrees)west;

    Parameters

    west

    the longitudinal component of the South-West corner point of this rectangular region

  • @returns the longitudinal component of the South-West corner point of this rectangular region

    Declaration

    Objective-C

    - (BDLocationDegrees)west;
  • Declaration

    Objective-C

    - (void)setNorth:(BDLocationDegrees)north;

    Parameters

    north

    the latitudinal component of the North-East corner point of this rectangular region

  • Returns the latitudinal component of the North-East corner point of this rectangular region

    Declaration

    Objective-C

    - (BDLocationDegrees)north;
  • Declaration

    Objective-C

    - (void)setEast:(BDLocationDegrees)east;

    Parameters

    east

    the longitudinal component of the North-East corner point of this rectangular region

  • @returns the longitudinal component of the North-East corner point of this rectangular region

    Declaration

    Objective-C

    - (BDLocationDegrees)east;
  • Sets the latitudinal component of the South-West corner point of this rectangular region

    Declaration

    Objective-C

    - (void)setSouth:(BDLocationDegrees)south;
  • @returns the latitudinal component of the South-West corner point of this rectangular region

    Declaration

    Objective-C

    - (BDLocationDegrees)south;
  • @returns the absolute difference between the East and West longitudes, in degrees.

    Declaration

    Objective-C

    - (BDLocationDegrees)longitudeSpan;
  • @returns the absolute difference between the North and South latitudes, in degrees.

    Declaration

    Objective-C

    - (BDLocationDegrees)latitudeSpan;
  • The North-East corner of this rectangular region

    Declaration

    Objective-C

    @property (nonatomic) BDPoint *northEast;
  • The South-West corner of this rectangular region

    Declaration

    Objective-C

    @property (nonatomic) BDPoint *southWest;
  • @returns An array of the corner @ref BDPoint “points” of this @ref BDBoundingBox, ordered: North, East, South, West.

    Declaration

    Objective-C

    - (NSArray *)vertices;