# Geometry

``public enum Geometry : Equatable``
``extension Geometry: GeoJSONObjectConvertible``
``extension Geometry: Codable``
``extension Geometry: GeometryConvertible``

A Geometry object represents points, curves, and surfaces in coordinate space. Use an instance of this enumeration whenever a value could be any kind of Geometry object.

• ``` point(_:) ```

A single position.

#### Declaration

Swift

``case point(_: Point)``
• ``` lineString(_:) ```

A collection of two or more positions, each position connected to the next position linearly.

#### Declaration

Swift

``case lineString(_: LineString)``
• ``` polygon(_:) ```

Conceptually, a collection of `Ring`s that form a single connected geometry.

#### Declaration

Swift

``case polygon(_: Polygon)``
• ``` multiPoint(_:) ```

A collection of positions that are disconnected but related.

#### Declaration

Swift

``case multiPoint(_: MultiPoint)``
• ``` multiLineString(_:) ```

A collection of `LineString` geometries that are disconnected but related.

#### Declaration

Swift

``case multiLineString(_: MultiLineString)``
• ``` multiPolygon(_:) ```

A collection of `Polygon` geometries that are disconnected but related.

#### Declaration

Swift

``case multiPolygon(_: MultiPolygon)``
• ``` geometryCollection(_:) ```

A heterogeneous collection of geometries that are related.

#### Declaration

Swift

``case geometryCollection(_: GeometryCollection)``
• ``` init(_:) ```

Initializes a geometry representing the given geometry–convertible instance.

#### Declaration

Swift

``public init(_ geometry: GeometryConvertible)``
• ``` geoJSONObject ```

#### Declaration

Swift

``public var geoJSONObject: GeoJSONObject { get }``
• ``` init(from:) ```

#### Declaration

Swift

``public init(from decoder: Decoder) throws``
• ``` encode(to:) ```

#### Declaration

Swift

``public func encode(to encoder: Encoder) throws``
• ``` geometry ```

#### Declaration

Swift

``public var geometry: Geometry { get }``