GeoCoordinates

public class GeoCoordinates : Codable

Represent geographic coordinates. The reference system used by the properties in this interface is the World Geodetic System (2d) [WGS84].

Attributes.

  • The latitude is a geographic coordinate specified in decimal degrees.

    Declaration

    Swift

    public var latitude: Double
  • The longitude is a geographic coordinates specified in decimal degrees.

    Declaration

    Swift

    public var longitude: Double
  • The altitude attribute (optional) denotes the height of the position, specified in meters above the [WGS84] ellipsoid. If the implementation cannot provide altitude information, the value of this attribute must be nil.

    Declaration

    Swift

    public var altitude: Double?
  • The accuracy attribute denotes the accuracy level of the latitude and longitude coordinates. It is specified in meters and must be supported by all implementations. The value of the accuracy attribute must be a non-negative real number.

    Declaration

    Swift

    public var accuracy: Double
  • The altitudeAccuracy attribute (optional) is specified in meters. If the implementation cannot provide altitude information, the value of this attribute must be undefined. Otherwise, the value of the altitudeAccuracy attribute must be a non-negative real number.

    Declaration

    Swift

    public var altitudeAccuracy: Double?
  • The heading attribute denotes the direction of travel of the hosting device and is specified in degrees, where 0 <= heading < 360, counting clockwise relative to the true north. If the implementation cannot provide heading information, the value of this attribute must be undefined. If the hosting device is stationary (i.e. the value of the speed attribute is 0), then the value of the heading attribute must be nil.

    Declaration

    Swift

    public var heading: Double?
  • The speed attribute denotes the magnitude of the horizontal component of the hosting device’s current velocity and is specified in meters per second. If the implementation cannot provide speed information, the value of this attribute must be nil. Otherwise, the value of the speed attribute must be a non-negative real number.

    Declaration

    Swift

    public var speed: Double?

Initializers.

Codable methods.

  • Declaration

    Swift

    public required init(from decoder: Decoder) throws
  • Declaration

    Swift

    public func encode(to encoder: Encoder) throws