Geometry

public struct Geometry
extension Geometry: Equatable

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

  • Creates a Geometry instance representing 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.

  • 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 implementation.

    Declaration

    Swift

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