BoundingBox
public struct BoundingBox
extension BoundingBox: Hashable
extension BoundingBox: Codable
A bounding box indicates the extremes of a GeoJSONObject along the x- and y-axes (longitude and latitude, respectively).
-
The southwesternmost position contained in the bounding box.
Declaration
Swift
public var southWest: LocationCoordinate2D -
The northeasternmost position contained in the bounding box.
Declaration
Swift
public var northEast: LocationCoordinate2D -
Initializes the smallest bounding box that contains all the given coordinates.
Declaration
Swift
public init?(from coordinates: [LocationCoordinate2D]?)Parameters
coordinatesThe coordinates to fit in the bounding box.
-
Initializes a bounding box defined by its southwesternmost and northeasternmost positions.
Declaration
Swift
public init(southWest: LocationCoordinate2D, northEast: LocationCoordinate2D)Parameters
southWestThe southwesternmost position contained in the bounding box.
northEastThe northeasternmost position contained in the bounding box.
-
Returns a Boolean value indicating whether the bounding box contains the given position.
Declaration
Swift
public func contains(_ coordinate: LocationCoordinate2D, ignoreBoundary: Bool = true) -> BoolParameters
coordinateThe coordinate that may or may not be contained by the bounding box.
ignoreBoundaryA Boolean value indicating whether a position lying exactly on the edge of the bounding box should be considered to be contained in the bounding box.
Return Value
trueif the bounding box contains the position;falseotherwise. -
Declaration
Swift
public func hash(into hasher: inout Hasher) -
Declaration
Swift
public func encode(to encoder: Encoder) throws -
Declaration
Swift
public init(from decoder: Decoder) throws
View on GitHub
Install in Dash
BoundingBox Structure Reference