GeometryCollection

public struct GeometryCollection
extension GeometryCollection: Equatable

The GeometryCollection struct represents a collection of Geometry objects as defined by the GeoJSON specification. It provides a way to group multiple geometries together, regardless of their types.

  • Creates a GeometryCollection with an array of Geometry objects.

    Declaration

    Swift

    public init(geometries: [Geometry] = [])

    Parameters

    geometries

    An array of Geometry instances. Defaults to an empty array.

  • Contains an array of Geometry objects that form the collection. Each geometry in this list can be of any type (Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, or GeometryCollection).

    Declaration

    Swift

    public let geometries: [Geometry]
  • Equatable implementation.

    Declaration

    Swift

    public static func == (lhs: GeometryCollection, rhs: GeometryCollection) -> Bool