MultiPolygon
public struct MultiPolygon : Equatable, ForeignMemberContainer
extension MultiPolygon: Codable
extension MultiPolygon: GeometryConvertible
A MultiPolygon geometry is a collection of Polygon
geometries that are disconnected but related.
-
The positions at which the multipolygon is located. Each nested array corresponds to one polygon.
Declaration
Swift
public var coordinates: [[[LocationCoordinate2D]]]
-
Declaration
Swift
public var foreignMembers: JSONObject
-
The polygon geometries that conceptually form the multipolygon.
Declaration
Swift
public var polygons: [Polygon] { get }
-
Initializes a multipolygon defined by the given positions.
Declaration
Swift
public init(_ coordinates: [[[LocationCoordinate2D]]])
Parameters
coordinates
The positions at which the multipolygon is located. Each nested array corresponds to one polygon.
-
Initializes a multipolygon coincident to the given polygons.
Declaration
Swift
public init(_ polygons: [Polygon])
Parameters
polygons
The polygons that together are coincident to the multipolygon.
-
Declaration
Swift
public init(from decoder: Decoder) throws
-
Declaration
Swift
public func encode(to encoder: Encoder) throws
-
Determines if the given coordinate falls within any of the polygons. The optional parameter
ignoreBoundary
will result in the method returning true if the given coordinate lies on the boundary line of the polygon or its interior rings.Calls contains function for each contained polygon
Declaration
Swift
public func contains(_ coordinate: LocationCoordinate2D, ignoreBoundary: Bool = false) -> Bool
-
Declaration
Swift
public var geometry: Geometry { get }