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
fromProjectionfrom projection
toProjectionto projection
Return Value
new projection transform
-
Create
Declaration
Objective-C
+ (PROJProjectionTransform *)transformFromEpsg:(int)fromEpsg andToEpsg:(int)toEpsg;Parameters
fromEpsgfrom epsg
toEpsgto epsg
Return Value
new projection transform
-
Create
Declaration
Objective-C
+ (PROJProjectionTransform *)transformFromAuthority:(NSString *)fromAuthority andFromIntCode:(int)fromCode andToAuthority:(NSString *)toAuthority andToIntCode:(int)toCode;Parameters
fromAuthorityfrom authority
fromCodefrom code
toAuthorityto authority
toCodeto code
Return Value
new projection transform
-
Create
Declaration
Objective-C
+ (PROJProjectionTransform *)transformFromAuthority:(NSString *)fromAuthority andFromCode:(NSString *)fromCode andToAuthority:(NSString *)toAuthority andToCode:(NSString *)toCode;Parameters
fromAuthorityfrom authority
fromCodefrom code
toAuthorityto authority
toCodeto code
Return Value
new projection transform
-
Create
Declaration
Objective-C
+ (PROJProjectionTransform *)transformFromProjection: (PROJProjection *)fromProjection andToEpsg:(int)toEpsg;Parameters
fromProjectionfrom projection
toEpsgto epsg
Return Value
new projection transform
-
Create
Declaration
Objective-C
+ (PROJProjectionTransform *)transformFromProjection: (PROJProjection *)fromProjection andToAuthority:(NSString *)toAuthority andToCode:(NSString *)toCode;Parameters
fromProjectionfrom projection
toAuthorityto authority
toCodeto code
Return Value
new projection transform
-
Create
Declaration
Objective-C
+ (PROJProjectionTransform *)transformFromEpsg:(int)fromEpsg andToProjection:(PROJProjection *)toProjection;Parameters
fromEpsgfrom epsg
toProjectionto projection
Return Value
new projection transform
-
Create
Declaration
Objective-C
+ (PROJProjectionTransform *)transformFromAuthority:(NSString *)fromAuthority andFromCode:(NSString *)fromCode andToProjection: (PROJProjection *)toProjection;Parameters
fromAuthorityfrom authority
fromCodefrom code
toProjectionto projection
Return Value
new projection transform
-
Create
Declaration
Objective-C
+ (PROJProjectionTransform *)transformWithProjectionTransform: (PROJProjectionTransform *)transform;Parameters
transformprojection 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
fromProjectionfrom projection
toProjectionto 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
fromEpsgfrom epsg
toEpsgto 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
fromAuthorityfrom authority
fromCodefrom code
toAuthorityto authority
toCodeto 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
fromAuthorityfrom authority
fromCodefrom code
toAuthorityto authority
toCodeto 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
fromProjectionfrom projection
toEpsgto 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
fromProjectionfrom projection
toAuthorityto authority
toCodeto 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
fromEpsgfrom epsg
toProjectionto 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
fromAuthorityfrom authority
fromCodefrom code
toProjectionto projection
Return Value
new projection transform
-
Initialize
Declaration
Objective-C
- (instancetype)initWithProjectionTransform: (PROJProjectionTransform *)transform;Swift
init!(projectionTransform transform: PROJProjectionTransform!)Parameters
transformprojection 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) -> CLLocationCoordinate2DParameters
fromlocation 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
from3d 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
xx coordinate
yy 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
minXmin x
minYmin y
maxXmax x
maxYmax 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() -> BoolReturn Value
true if the same projection
-
Get the inverse transformation
Declaration
Objective-C
- (PROJProjectionTransform *)inverseTransformation;Swift
func inverseTransformation() -> PROJProjectionTransform!Return Value
inverse transformation
View on GitHub
PROJProjectionTransform Class Reference