Feature

public struct Feature

Defines a simple geographical feature such as a point, polygon, etc.

Lifecycle

  • Create a new Feature

    Declaration

    Swift

    public init(type: String, properties: [String : Any]?, geometry: Geometry?, id: String, bbox: [Double])

    Parameters

    type

    Feature type.

    properties

    Properties object.

    geometry

    Object representing geometry.

    id

    ID of the feature.

Public

  • Feature type.

    Declaration

    Swift

    public let type: String
  • Properties object.

    Declaration

    Swift

    public let properties: [String : Any]?
  • Object representing geometry.

    Declaration

    Swift

    public let geometry: Geometry?
  • id

    ID of the feature.

    Declaration

    Swift

    public let id: String
  • Includes information on the coordinate range. Bounding box is an array of length 2*n where n is the number of dimensions represented in the contained geometries. At a minimum, a bounding box will have two coordinates that define a rectangle. A 3D bounding box can be produced if elevation or altitude is defined.

    Declaration

    Swift

    public let bbox: [Double]