GeometryValue
open class GeometryValue: GeospatialValue
Abstract base class for geometry data values.
-
Default Spatial Reference System Identifier for Geometry Values (0).
Declaration
Swift
public static let defaultSrid: Int = (0 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.
-
Declaration
Swift
open class func parseAnyWKT(_ text: String, sridRequired: Bool = false) throws -> GeometryValue
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 0.
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.
-
Declaration
Swift
open class func with(x: Double, y: Double) -> GeometryPoint
Parameters
x
X-coordinate.
y
Y-coordinate.
Return Value
2D geometry point.
-
Declaration
Swift
open class func with(x: Double, y: Double, m: Double) -> GeometryPoint
Parameters
x
X-coordinate.
y
Y-coordinate.
m
M-coordinate (measure).
Return Value
2D geometry point with measure.
-
Declaration
Swift
open class func with(x: Double, y: Double, z: Double) -> GeometryPoint
Parameters
x
X-coordinate.
y
Y-coordinate.
z
Z-coordinate.
Return Value
3D geometry point.
-
Declaration
Swift
open class func with(x: Double, y: Double, z: Double, m: Double) -> GeometryPoint
Parameters
x
X-coordinate.
y
Y-coordinate.
z
Z-coordinate.
m
M-coordinate (measure).
Return Value
3D geometry point with measure.
-
Declaration
Swift
open class func with(latitude: Double, longitude: Double) -> GeometryPoint
Parameters
latitude
Y-coordinate.
longitude
X-coordinate.
Return Value
2D geometry point.