GeographyValue

open class GeographyValue: GeospatialValue

Abstract base class for geography data values.

  • Default Spatial Reference System Identifier for Geography Values (4326).

    Declaration

    Swift

    public static let defaultSrid: Int = (4326 as Int)
  • Default initializer.

    Declaration

    Swift

    override public init()
  • Declaration

    Swift

    open func formatWKT(sridRequired: Bool = false) -> String

    Parameters

    sridRequired

    Is SRID prefix required?

    Return Value

    This value formatted in OData WKT (well-known text) format.

  • Parse a geography value from GeoJSON format.

    Declaration

    Swift

    open class func parseAny(_ text: String, type: DataType) throws -> GeographyValue

    Parameters

    text

    A value in GeoJSON format.

    type
  • Declaration

    Swift

    open class func parseAnyWKT(_ text: String, sridRequired: Bool = false) throws -> GeographyValue

    Parameters

    text

    A value in OData WKT format.

    sridRequired

    Is SRID prefix required?

    Return Value

    A value parsed from OData WKT (well-known text) format.

  • Spatial Reference System Code, e.g. EPSG SRID. Defaults to 4326.

    Declaration

    Swift

    override open var srsCode: Int
  • Spatial Reference System Name (optional).

    Declaration

    Swift

    override open var srsName: String?
  • Convert this data value to a string. If the dataType is defined by XML Schema Part 2: Datatypes, then the corresponding lexical format is used. JSON format is used for structured values (arrays and objects).

    Declaration

    Swift

    override open func toString() -> String

    Return Value

    Lexical representation of this data value.