BDPolygon

Objective-C

@interface BDPolygon : BDPolygonal <NSSecureCoding>

Swift

class BDPolygon : BDPolygonal, NSSecureCoding

Arbitrary region on the Earth’s surface, comprised of two or more BDPoint “points” connected by straight-line segments.

Unlike a BDLineString “line-string” this geometry forms an enclosed area.

  • Convenience method to create a BDPolygon with an array of BDPoint vertices.

    Vertices is an array containing 1 or more BDPointSDK objects describing the intended polygon. If the array is empty, or if the array contains any non-BDPointSDK elements, an NSInvalidArgumentException will be thrown. Copy is if YES, then the BDPointSDK elements will be copied before inclusion in the new BDPolygon.

    Declaration

    Objective-C

    + (instancetype)polygonWithVertices:(NSArray *)vertices copy:(BOOL)copy;

    Swift

    convenience init!(vertices: [Any]!, copy: Bool)
  • Convenience method to construct an ad-hoc polygon using variable length lat/long variable arguments.

    Declaration

    Objective-C

    + (instancetype)polygonWithLatLongCoordinates:(NSNumber *)scalar, ...;