CoordinatesObject
Objective-C
@interface CoordinatesObject : NSObject
Swift
class CoordinatesObject : NSObject
This class encapsulates coordinates information.
-
Initializes and returns a newly allocated object using the model data.
Declaration
Objective-C
- (nonnull instancetype)initWithModelData:(nonnull void *)data;
-
Returns the model data.
Declaration
Objective-C
- (nonnull void *)getModelData;
-
Initializes and returns a newly allocated object using parameter values.
Declaration
Objective-C
+ (nonnull instancetype)coordinatesWithLatitude:(double)latitude longitude:(double)longitude;
Swift
class func coordinates(withLatitude latitude: Double, longitude: Double) -> Self
-
Initializes and returns a newly allocated object using parameter values.
Declaration
Objective-C
+ (nonnull instancetype)coordinatesWithLatitude:(double)latitude longitude:(double)longitude altitude:(double)altitude;
Swift
class func coordinates(withLatitude latitude: Double, longitude: Double, altitude: Double) -> Self
-
The latitude in degrees. @discussion Positive values indicate latitudes north of the equator. Negative values indicate latitudes south of the equator. @discussion Valid values -90.0 .. +90.0.
Declaration
Objective-C
@property (nonatomic) double latitude;
Swift
var latitude: Double { get set }
-
The longitude in degrees. @discussion Measurements are relative to the zero meridian, with positive values extending east of the meridian and negative values extending west of the meridian. @discussion Valid values -180.0 .. +180.0.
Declaration
Objective-C
@property (nonatomic) double longitude;
Swift
var longitude: Double { get set }
-
The altitude in meters.
Declaration
Objective-C
@property (nonatomic) double altitude;
Swift
var altitude: Double { get set }
-
Returns true if the coordinates are valid.
Declaration
Objective-C
- (BOOL)isValid;
Swift
func isValid() -> Bool
-
Calculate the distance in meters between two WGS84 coordinates.
Declaration
Objective-C
- (double)getDistance:(nonnull CoordinatesObject *)point;
Swift
func getDistance(_ point: CoordinatesObject) -> Double
Parameters
point
The coordinates to which the distance should be calculated.
-
Calculate the azimuth between the two points according to the ellipsoid model of WGS84.
Declaration
Objective-C
- (double)getAzimuth:(nonnull CoordinatesObject *)point;
Swift
func getAzimuth(_ point: CoordinatesObject) -> Double
Parameters
point
The coordinates to which the a should be calculated.
-
Returns parent scene object to which coordinates belongs.
Declaration
Objective-C
- (int)getSceneObject;
Swift
func getSceneObject() -> Int32