OpenParking Documentation Beta

Structure Geo​Json.​Feature

@dynamicMemberLookup public struct Feature: Decodable
GeoJson.Feature GeoJson.Feature Decodable Decodable GeoJson.Feature->Decodable

Member Of

GeoJson

Nested Types

GeoJson.Feature.Geometry

Conforms To

Decodable

Properties

type

let type: String

geometry

let geometry: Geometry

properties

let properties: [String: AnyDecodable]

name

var name: String

coordinates

var coordinates: Coordinates?

Methods

value(for:​)

public func value<T>(for key: String) throws -> T

Extract a value for a given key from lot metadata.

Throws

LotError.missingMetadataField if no such key exists.

url​Value(for:​)

public func urlValue(for key: String) throws -> URL?

Extract a URL for a given key from lot metadata.

Throws

LotError.missingMetadataField if no such key exists.

Returns

URL or nil if the value was malformed.