Geometry

public struct Geometry
extension Geometry: Equatable

The Geometry struct represents a single geometric entity according to the GeoJSON specification.

Lifecycle

  • Initializes a Geometry object to represent a Geometry Collection type.

    Declaration

    Swift

    public init(type: Geometry.GeometryType, geometries: GeometryCollection)

    Parameters

    type

    The type of geometry, which should be a geometryCollection in this context.

    geometries

    A GeometryCollection object that encapsulates a list of Geometry instances.

Public

  • The GeometryType enumeration represents the seven geometry types defined by the GeoJSON specification.

    See more

    Declaration

    Swift

    public enum GeometryType
  • The type of this Geometry instance.

    Declaration

    Swift

    public let type: GeometryType
  • Contains the coordinates of the geometric entity when the Geometry is not a collection. This is nil for a Geometry Collection type.

    Declaration

    Swift

    public let coordinates: GeoJSONGeometry?
  • Contains a collection of Geometry instances when this Geometry represents a Geometry Collection. This is nil for other types.

    Declaration

    Swift

    public let geometries: GeometryCollection?

Equatable

  • Equatable implementation.

    Declaration

    Swift

    public static func == (lhs: TomTomSDKCommon.Geometry, rhs: TomTomSDKCommon.Geometry) -> Bool