SFGPosition

Objective-C

@interface SFGPosition : NSObject

Swift

class SFGPosition : NSObject

Position

  • Coordinate values: long, lat, altitude, and additional elements such as m

    Declaration

    Objective-C

    @property (nonatomic, strong) NSMutableArray<NSDecimalNumber *> *coordinates;

    Swift

    var coordinates: NSMutableArray! { get set }
  • Create

    Declaration

    Objective-C

    + (SFGPosition *)positionWithPoint:(SFPoint *)point;

    Parameters

    point

    simple point

    Return Value

    new position

  • Create

    Declaration

    Objective-C

    + (SFGPosition *)positionWithLongitude:(NSDecimalNumber *)longitude
                               andLatitude:(NSDecimalNumber *)latitude;

    Parameters

    longitude

    longitude value

    latitude

    latitude value

    Return Value

    new position

  • Create

    Declaration

    Objective-C

    + (SFGPosition *)positionWithLongitudeValue:(double)longitude
                               andLatitudeValue:(double)latitude;

    Parameters

    longitude

    longitude value

    latitude

    latitude value

    Return Value

    new position

  • Create

    Declaration

    Objective-C

    + (SFGPosition *)positionWithLongitude:(NSDecimalNumber *)longitude
                               andLatitude:(NSDecimalNumber *)latitude
                               andAltitude:(NSDecimalNumber *)altitude;

    Parameters

    longitude

    longitude value

    latitude

    latitude value

    altitude

    altitude value

    Return Value

    new position

  • Create

    Declaration

    Objective-C

    + (SFGPosition *)positionWithLongitudeValue:(double)longitude
                               andLatitudeValue:(double)latitude
                               andAltitudeValue:(double)altitude;

    Parameters

    longitude

    longitude value

    latitude

    latitude value

    altitude

    altitude value

    Return Value

    new position

  • Create

    Declaration

    Objective-C

    + (SFGPosition *)positionWithLongitude:(NSDecimalNumber *)longitude
                               andLatitude:(NSDecimalNumber *)latitude
                               andAltitude:(NSDecimalNumber *)altitude
                             andAdditional:(NSDecimalNumber *)additionalElement;

    Parameters

    longitude

    longitude value

    latitude

    latitude value

    altitude

    altitude value

    additionalElement

    additional value

    Return Value

    new position

  • Create

    Declaration

    Objective-C

    + (SFGPosition *)positionWithLongitudeValue:(double)longitude
                               andLatitudeValue:(double)latitude
                               andAltitudeValue:(double)altitude
                             andAdditionalValue:(double)additionalElement;

    Parameters

    longitude

    longitude value

    latitude

    latitude value

    altitude

    altitude value

    additionalElement

    additional value

    Return Value

    new position

  • Create

    Declaration

    Objective-C

    + (SFGPosition *)positionWithLongitude:(NSDecimalNumber *)longitude
                               andLatitude:(NSDecimalNumber *)latitude
                               andAltitude:(NSDecimalNumber *)altitude
                            andAdditionals:
                                (NSArray<NSDecimalNumber *> *)additionalElements;

    Parameters

    longitude

    longitude value

    latitude

    latitude value

    altitude

    altitude value

    additionalElements

    additional values

    Return Value

    new position

  • Create

    Declaration

    Objective-C

    + (SFGPosition *)positionWithLongitudeValue:(double)longitude
                               andLatitudeValue:(double)latitude
                               andAltitudeValue:(double)altitude
                                 andAdditionals:(NSArray<NSDecimalNumber *> *)
                                                    additionalElements;

    Parameters

    longitude

    longitude value

    latitude

    latitude value

    altitude

    altitude value

    additionalElements

    additional values

    Return Value

    new position

  • Create

    Declaration

    Objective-C

    + (SFGPosition *)positionWithCoordinates:(NSArray *)coordinates;

    Parameters

    coordinates

    coordinates

    Return Value

    new position

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithPoint:(SFPoint *)point;

    Swift

    init!(point: SFPoint!)

    Parameters

    point

    simple point

    Return Value

    new position

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithLongitude:(NSDecimalNumber *)longitude
                          andLatitude:(NSDecimalNumber *)latitude;

    Swift

    init!(longitude: NSDecimalNumber!, andLatitude latitude: NSDecimalNumber!)

    Parameters

    longitude

    longitude value

    latitude

    latitude value

    Return Value

    new position

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithLongitudeValue:(double)longitude
                          andLatitudeValue:(double)latitude;

    Swift

    init!(longitudeValue longitude: Double, andLatitudeValue latitude: Double)

    Parameters

    longitude

    longitude value

    latitude

    latitude value

    Return Value

    new position

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithLongitude:(NSDecimalNumber *)longitude
                          andLatitude:(NSDecimalNumber *)latitude
                          andAltitude:(NSDecimalNumber *)altitude;

    Swift

    init!(longitude: NSDecimalNumber!, andLatitude latitude: NSDecimalNumber!, andAltitude altitude: NSDecimalNumber!)

    Parameters

    longitude

    longitude value

    latitude

    latitude value

    altitude

    altitude value

    Return Value

    new position

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithLongitudeValue:(double)longitude
                          andLatitudeValue:(double)latitude
                          andAltitudeValue:(double)altitude;

    Swift

    init!(longitudeValue longitude: Double, andLatitudeValue latitude: Double, andAltitudeValue altitude: Double)

    Parameters

    longitude

    longitude value

    latitude

    latitude value

    altitude

    altitude value

    Return Value

    new position

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithLongitude:(NSDecimalNumber *)longitude
                          andLatitude:(NSDecimalNumber *)latitude
                          andAltitude:(NSDecimalNumber *)altitude
                        andAdditional:(NSDecimalNumber *)additionalElement;

    Swift

    init!(longitude: NSDecimalNumber!, andLatitude latitude: NSDecimalNumber!, andAltitude altitude: NSDecimalNumber!, andAdditional additionalElement: NSDecimalNumber!)

    Parameters

    longitude

    longitude value

    latitude

    latitude value

    altitude

    altitude value

    additionalElement

    additional value

    Return Value

    new position

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithLongitudeValue:(double)longitude
                          andLatitudeValue:(double)latitude
                          andAltitudeValue:(double)altitude
                        andAdditionalValue:(double)additionalElement;

    Swift

    init!(longitudeValue longitude: Double, andLatitudeValue latitude: Double, andAltitudeValue altitude: Double, andAdditionalValue additionalElement: Double)

    Parameters

    longitude

    longitude value

    latitude

    latitude value

    altitude

    altitude value

    additionalElement

    additional value

    Return Value

    new position

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithLongitude:(NSDecimalNumber *)longitude
                          andLatitude:(NSDecimalNumber *)latitude
                          andAltitude:(NSDecimalNumber *)altitude
                       andAdditionals:
                           (NSArray<NSDecimalNumber *> *)additionalElements;

    Swift

    init!(longitude: NSDecimalNumber!, andLatitude latitude: NSDecimalNumber!, andAltitude altitude: NSDecimalNumber!, andAdditionals additionalElements: [NSDecimalNumber]!)

    Parameters

    longitude

    longitude value

    latitude

    latitude value

    altitude

    altitude value

    additionalElements

    additional values

    Return Value

    new position

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithLongitudeValue:(double)longitude
                          andLatitudeValue:(double)latitude
                          andAltitudeValue:(double)altitude
                            andAdditionals:
                                (NSArray<NSDecimalNumber *> *)additionalElements;

    Swift

    init!(longitudeValue longitude: Double, andLatitudeValue latitude: Double, andAltitudeValue altitude: Double, andAdditionals additionalElements: [NSDecimalNumber]!)

    Parameters

    longitude

    longitude value

    latitude

    latitude value

    altitude

    altitude value

    additionalElements

    additional values

    Return Value

    new position

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithCoordinates:(NSArray *)coordinates;

    Swift

    init!(coordinates: [Any]!)

    Parameters

    coordinates

    coordinates

    Return Value

    new position

  • Check if the position has additional elements

    Declaration

    Objective-C

    - (BOOL)hasAdditionalElements;

    Swift

    func hasAdditionalElements() -> Bool

    Return Value

    true if additional elements

  • Get the additional elements

    Declaration

    Objective-C

    - (NSArray<NSDecimalNumber *> *)additionalElements;

    Swift

    func additionalElements() -> [NSDecimalNumber]!

    Return Value

    additional elements

  • -x

    Get the x value

    Declaration

    Objective-C

    - (NSDecimalNumber *)x;

    Swift

    func x() -> NSDecimalNumber!

    Return Value

    x

  • -y

    Get the y value

    Declaration

    Objective-C

    - (NSDecimalNumber *)y;

    Swift

    func y() -> NSDecimalNumber!

    Return Value

    y

  • -z

    Get the z value

    Declaration

    Objective-C

    - (NSDecimalNumber *)z;

    Swift

    func z() -> NSDecimalNumber!

    Return Value

    z

  • -m

    Get the m value

    Declaration

    Objective-C

    - (NSDecimalNumber *)m;

    Swift

    func m() -> NSDecimalNumber!

    Return Value

    m

  • Check if position has a z value

    Declaration

    Objective-C

    - (BOOL)hasZ;

    Swift

    func hasZ() -> Bool

    Return Value

    true if has z value

  • Check if position has a m value

    Declaration

    Objective-C

    - (BOOL)hasM;

    Swift

    func hasM() -> Bool

    Return Value

    true if has m value

  • Convert to simple point

    Declaration

    Objective-C

    - (SFPoint *)toSimplePoint;

    Swift

    func toSimplePoint() -> SFPoint!

    Return Value

    simple point