NSDK_GeoPosition

@interface NSDK_GeoPosition : NSObject

Specifies a real-world position in format GEODEZ.

Note: The functions that expect or return a int value, use the NSDK_GEOCONVERSION_FACTOR = 1000000 for the conversion from double to int.

@author PTV AG Karlsruhe

  • base init function

    Declaration

    Objective-C

    - (id)init;

    Swift

    init!()
  • Declaration

    Objective-C

    - (instancetype)initWithLatitude:(double)latitude longitude:(double)longitude;

    Swift

    init!(latitude: Double, longitude: Double)

    Parameters

    latitude

    the latitude value as double

    longitude

    the latitude value as double

    Return Value

    the instantiated object

  • Note that the latitude and longitude values are muliplied by the NSDK_GEOCONVERSION_FACTOR = 1000000.

    Declaration

    Objective-C

    - (instancetype)initWithIntLatitude:(int)latitude longitude:(int)longitude;

    Swift

    init!(intLatitude latitude: Int32, longitude: Int32)

    Parameters

    latitude

    the latitude value as int (multiplicated with NSDK_GEOCONVERSION_FACTOR)

    longitude

    the latitude value as int (multiplicated with NSDK_GEOCONVERSION_FACTOR)

    Return Value

    the instantiated object

  • init with NSDK_Position (Mercator Position)

    Declaration

    Objective-C

    - (instancetype)initWithNSDKPosition:(NSDK_Position *)pos;

    Swift

    init!(nsdkPosition pos: NSDK_Position!)

    Parameters

    pos

    the Mercator Position

  • init with Mercator values

    Declaration

    Objective-C

    - (instancetype)initWithMercatorX:(int)mercatorX y:(int)mercatorY;

    Swift

    init!(mercatorX: Int32, y mercatorY: Int32)

    Parameters

    mercatorX

    the Mercator X Position

    mercatorY

    the Mercator Y Position

  • Sets the latitude of the position (GeoDez * NSDK_GEOCONVERSION_FACTOR).

    Declaration

    Objective-C

    - (void)setLatitude:(int)latitude;

    Swift

    func setLatitude(_ latitude: Int32)

    Parameters

    latitude

    the latitude of the position to set.

  • Sets the longitude of the position (GeoDez * NSDK_GEOCONVERSION_FACTOR).

    Declaration

    Objective-C

    - (void)setLongitude:(int)longitude;

    Swift

    func setLongitude(_ longitude: Int32)

    Parameters

    longitude

    the latitude of the position to set.

  • Returns the latitude of the position (GeoDez * NSDK_GEOCONVERSION_FACTOR).

    Declaration

    Objective-C

    - (int)getLatitude;

    Swift

    func getLatitude() -> Int32

    Return Value

    the latitude of the position.

  • Returns the latitude of the position

    Declaration

    Objective-C

    - (double)getLatitudeDouble;

    Swift

    func getLatitudeDouble() -> Double

    Return Value

    the latitude of the position.

  • Returns the longitude of the position (GeoDez * NSDK_GEOCONVERSION_FACTOR).

    Declaration

    Objective-C

    - (int)getLongitude;

    Swift

    func getLongitude() -> Int32

    Return Value

    the longitude of the position.

  • Returns the longitude of the position

    Declaration

    Objective-C

    - (double)getLongitudeDouble;

    Swift

    func getLongitudeDouble() -> Double

    Return Value

    the longitude of the position.

  • Converts the geodez position to a mercator position

    Declaration

    Objective-C

    - (NSDK_Position *)toPosition;

    Swift

    func toPosition() -> NSDK_Position!

    Return Value

    the mercator position