SITCoordinateConverter
@interface SITCoordinateConverter : NSObject
Utility class to convert between cartesian coordinates and geographical coordinates.
-
Initializer
Declaration
Objective-C
- (instancetype _Nonnull)initWithDimensions:(SITDimensions *_Nonnull)dimensions center:(CLLocationCoordinate2D)center rotation:(SITAngle *_Nonnull)rotation;
Parameters
dimensions
Dimensions of the building
center
Center of the building
rotation
Rotation of the building
Return Value
SITCoordinateConverter
-
Dimensions of cartesian area, in meters
Declaration
Objective-C
- (SITDimensions *_Nonnull)getDimensions;
Return Value
-
Convert geographic coordinate to cartesian coordinate
Declaration
Objective-C
- (SITCartesianCoordinate *_Nonnull)toCartesianCoordinate: (CLLocationCoordinate2D)coordinate;
Return Value
-
Convert cartesian coordinate to geographic coordinate
Declaration
Objective-C
- (CLLocationCoordinate2D)toLocationCoordinate: (SITCartesianCoordinate *_Nonnull)cartesianCoordinate;
Return Value
CLLocationCoordinate2D
-
Convert point to geographic coordinate
Declaration
Objective-C
- (CLLocationCoordinate2D)coordinateFromPoint:(CGPoint)point;
Return Value
CLLocationCoordinate2D
-
Convert cartesian angle to geographic angle
Declaration
Objective-C
- (float)angleFromYaw:(float)yaw;
-
Building bounds
Declaration
Objective-C
- (SITBounds)bounds;
-
Rotated bounds
Declaration
Objective-C
- (SITBounds)rotatedBounds;