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 ofGeometry
instances.
-
The
See moreGeometryType
enumeration represents the seven geometry types defined by the GeoJSON specification.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 isnil
for a Geometry Collection type.Declaration
Swift
public let coordinates: GeoJSONGeometry?
-
Contains a collection of
Geometry
instances when thisGeometry
represents a Geometry Collection. This isnil
for other types.Declaration
Swift
public let geometries: GeometryCollection?
-
Equatable implementation.
Declaration
Swift
public static func == (lhs: TomTomSDKCommon.Geometry, rhs: TomTomSDKCommon.Geometry) -> Bool