PROJProjectionTransform

Objective-C

@interface PROJProjectionTransform : NSObject

Swift

class PROJProjectionTransform : NSObject

Projection transformation between a from and to projection

  • From projection

    Declaration

    Objective-C

    @property (nonatomic, strong) PROJProjection *fromProjection;

    Swift

    var fromProjection: PROJProjection! { get set }
  • To projection

    Declaration

    Objective-C

    @property (nonatomic, strong) PROJProjection *toProjection;

    Swift

    var toProjection: PROJProjection! { get set }
  • Create

    Declaration

    Objective-C

    + (PROJProjectionTransform *)
        transformFromProjection:(PROJProjection *)fromProjection
                andToProjection:(PROJProjection *)toProjection;

    Parameters

    fromProjection

    from projection

    toProjection

    to projection

    Return Value

    new projection transform

  • Create

    Declaration

    Objective-C

    + (PROJProjectionTransform *)transformFromEpsg:(int)fromEpsg
                                         andToEpsg:(int)toEpsg;

    Parameters

    fromEpsg

    from epsg

    toEpsg

    to epsg

    Return Value

    new projection transform

  • Create

    Declaration

    Objective-C

    + (PROJProjectionTransform *)transformFromAuthority:(NSString *)fromAuthority
                                         andFromIntCode:(int)fromCode
                                         andToAuthority:(NSString *)toAuthority
                                           andToIntCode:(int)toCode;

    Parameters

    fromAuthority

    from authority

    fromCode

    from code

    toAuthority

    to authority

    toCode

    to code

    Return Value

    new projection transform

  • Create

    Declaration

    Objective-C

    + (PROJProjectionTransform *)transformFromAuthority:(NSString *)fromAuthority
                                            andFromCode:(NSString *)fromCode
                                         andToAuthority:(NSString *)toAuthority
                                              andToCode:(NSString *)toCode;

    Parameters

    fromAuthority

    from authority

    fromCode

    from code

    toAuthority

    to authority

    toCode

    to code

    Return Value

    new projection transform

  • Create

    Declaration

    Objective-C

    + (PROJProjectionTransform *)transformFromProjection:
                                     (PROJProjection *)fromProjection
                                               andToEpsg:(int)toEpsg;

    Parameters

    fromProjection

    from projection

    toEpsg

    to epsg

    Return Value

    new projection transform

  • Create

    Declaration

    Objective-C

    + (PROJProjectionTransform *)transformFromProjection:
                                     (PROJProjection *)fromProjection
                                          andToAuthority:(NSString *)toAuthority
                                               andToCode:(NSString *)toCode;

    Parameters

    fromProjection

    from projection

    toAuthority

    to authority

    toCode

    to code

    Return Value

    new projection transform

  • Create

    Declaration

    Objective-C

    + (PROJProjectionTransform *)transformFromEpsg:(int)fromEpsg
                                   andToProjection:(PROJProjection *)toProjection;

    Parameters

    fromEpsg

    from epsg

    toProjection

    to projection

    Return Value

    new projection transform

  • Create

    Declaration

    Objective-C

    + (PROJProjectionTransform *)transformFromAuthority:(NSString *)fromAuthority
                                            andFromCode:(NSString *)fromCode
                                        andToProjection:
                                            (PROJProjection *)toProjection;

    Parameters

    fromAuthority

    from authority

    fromCode

    from code

    toProjection

    to projection

    Return Value

    new projection transform

  • Create

    Declaration

    Objective-C

    + (PROJProjectionTransform *)transformWithProjectionTransform:
        (PROJProjectionTransform *)transform;

    Parameters

    transform

    projection transform

    Return Value

    new projection transform

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithFromProjection:(PROJProjection *)fromProjection
                           andToProjection:(PROJProjection *)toProjection;

    Swift

    init!(from fromProjection: PROJProjection!, andTo toProjection: PROJProjection!)

    Parameters

    fromProjection

    from projection

    toProjection

    to projection

    Return Value

    new projection transform

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithFromEpsg:(int)fromEpsg andToEpsg:(int)toEpsg;

    Swift

    init!(fromEpsg: Int32, andToEpsg toEpsg: Int32)

    Parameters

    fromEpsg

    from epsg

    toEpsg

    to epsg

    Return Value

    new projection transform

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithFromAuthority:(NSString *)fromAuthority
                           andFromIntCode:(int)fromCode
                           andToAuthority:(NSString *)toAuthority
                             andToIntCode:(int)toCode;

    Swift

    init!(fromAuthority: String!, andFromIntCode fromCode: Int32, andToAuthority toAuthority: String!, andToIntCode toCode: Int32)

    Parameters

    fromAuthority

    from authority

    fromCode

    from code

    toAuthority

    to authority

    toCode

    to code

    Return Value

    new projection transform

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithFromAuthority:(NSString *)fromAuthority
                              andFromCode:(NSString *)fromCode
                           andToAuthority:(NSString *)toAuthority
                                andToCode:(NSString *)toCode;

    Swift

    init!(fromAuthority: String!, andFromCode fromCode: String!, andToAuthority toAuthority: String!, andToCode toCode: String!)

    Parameters

    fromAuthority

    from authority

    fromCode

    from code

    toAuthority

    to authority

    toCode

    to code

    Return Value

    new projection transform

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithFromProjection:(PROJProjection *)fromProjection
                                 andToEpsg:(int)toEpsg;

    Swift

    init!(from fromProjection: PROJProjection!, andToEpsg toEpsg: Int32)

    Parameters

    fromProjection

    from projection

    toEpsg

    to epsg

    Return Value

    new projection transform

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithFromProjection:(PROJProjection *)fromProjection
                            andToAuthority:(NSString *)toAuthority
                                 andToCode:(NSString *)toCode;

    Swift

    init!(from fromProjection: PROJProjection!, andToAuthority toAuthority: String!, andToCode toCode: String!)

    Parameters

    fromProjection

    from projection

    toAuthority

    to authority

    toCode

    to code

    Return Value

    new projection transform

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithFromEpsg:(int)fromEpsg
                     andToProjection:(PROJProjection *)toProjection;

    Swift

    init!(fromEpsg: Int32, andTo toProjection: PROJProjection!)

    Parameters

    fromEpsg

    from epsg

    toProjection

    to projection

    Return Value

    new projection transform

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithFromAuthority:(NSString *)fromAuthority
                              andFromCode:(NSString *)fromCode
                          andToProjection:(PROJProjection *)toProjection;

    Swift

    init!(fromAuthority: String!, andFromCode fromCode: String!, andTo toProjection: PROJProjection!)

    Parameters

    fromAuthority

    from authority

    fromCode

    from code

    toProjection

    to projection

    Return Value

    new projection transform

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithProjectionTransform:
        (PROJProjectionTransform *)transform;

    Swift

    init!(projectionTransform transform: PROJProjectionTransform!)

    Parameters

    transform

    projection transform

    Return Value

    new projection transform

  • Destroy the transform memory

    Declaration

    Objective-C

    - (void)free;

    Swift

    func free()
  • Destroy the transform memory

    Declaration

    Objective-C

    - (void)close;

    Swift

    func close()
  • Destroy the transform memory

    Declaration

    Objective-C

    - (void)destroy;

    Swift

    func destroy()
  • Transform a location coordinate

    Declaration

    Objective-C

    - (CLLocationCoordinate2D)transform:(CLLocationCoordinate2D)from;

    Swift

    func transform(_ from: CLLocationCoordinate2D) -> CLLocationCoordinate2D

    Parameters

    from

    location coordinate

    Return Value

    transformed location coordinate

  • Transform a 3d location coordinate

    Declaration

    Objective-C

    - (PROJLocationCoordinate3D *)transform3d:(PROJLocationCoordinate3D *)from;

    Swift

    func transform3d(_ from: PROJLocationCoordinate3D!) -> PROJLocationCoordinate3D!

    Parameters

    from

    3d location coordinate

    Return Value

    transformed 3d location coordinate

  • Transform a x and y coordinate

    Declaration

    Objective-C

    - (NSArray<NSDecimalNumber *> *)transformX:(double)x andY:(double)y;

    Swift

    func transformX(_ x: Double, andY y: Double) -> [NSDecimalNumber]!

    Parameters

    x

    x coordinate

    y

    y coordinate

    Return Value

    transformed coordinates as [x, y]

  • Transform the coordinate bounds

    Declaration

    Objective-C

    - (NSArray<NSDecimalNumber *> *)transformMinX:(double)minX
                                          andMinY:(double)minY
                                          andMaxX:(double)maxX
                                          andMaxY:(double)maxY;

    Swift

    func transformMinX(_ minX: Double, andMinY minY: Double, andMaxX maxX: Double, andMaxY maxY: Double) -> [NSDecimalNumber]!

    Parameters

    minX

    min x

    minY

    min y

    maxX

    max x

    maxY

    max y

    Return Value

    transformed coordinate bounds as [minX, minY, maxX, maxY]

  • Is the from and to projection the same?

    Declaration

    Objective-C

    - (BOOL)isSameProjection;

    Swift

    func isSameProjection() -> Bool

    Return Value

    true if the same projection

  • Get the inverse transformation

    Declaration

    Objective-C

    - (PROJProjectionTransform *)inverseTransformation;

    Swift

    func inverseTransformation() -> PROJProjectionTransform!

    Return Value

    inverse transformation