SITPoint
@interface SITPoint : NSObject
Associate geographical coordinate (Location) with Building and Floor (Cartography) and cartesian coordinate relative to that building.
-
Create an indoor point
Declaration
Objective-C
- (instancetype _Nonnull) initWithCoordinate:(CLLocationCoordinate2D)coordinate buildingIdentifier:(NSString *_Nonnull)buildingIdentifier floorIdentifier:(NSString *_Nonnull)floorIdentifier cartesianCoordinate:(SITCartesianCoordinate *_Nonnull)cartesianCoordinate;
Parameters
coordinate
Geographical coordinate of the point
buildingIdentifier
unique identifier of the building
floorIdentifier
unique identifier of the floor
cartesianCoordinate
coordinate in cartesian coordinate system
Return Value
initialized indoor point
-
Create an outdoor point
Declaration
Objective-C
- (instancetype _Nonnull)initWithCoordinate:(CLLocationCoordinate2D)coordinate buildingIdentifier: (NSString *_Nonnull)buildingIdentifier;
Parameters
coordinate
Geographical coordinate of the point
buildingIdentifier
unique identifier of the building
Return Value
initialized outdoor point
-
Create an outdoor point with a coordinate
Declaration
Objective-C
- (instancetype _Nonnull)initWihtCoordinate:(CLLocationCoordinate2D)coordinate;
Parameters
coordinate
Geographical coordinate of the point
Return Value
initialized point
-
Create a point placed indoors. The geographical coordinate is calculated using the building
Declaration
Objective-C
- (instancetype _Nonnull)initWithBuilding:(SITBuilding *_Nonnull)building floorIdentifier:(NSString *_Nonnull)floorIdentifier cartesianCoordinate: (SITCartesianCoordinate *_Nonnull)cartesianCoordinate;
Parameters
building
Building
floorIdentifier
unique identifier of the floor
cartesianCoordinate
coordinate in cartesian coordinate system
Return Value
initialized point
-
Create a point placed indoors. The cartesian coordinate is calculated using the building
Declaration
Objective-C
- (instancetype _Nonnull)initWithBuilding:(SITBuilding *_Nonnull)building floorIdentifier:(NSString *_Nonnull)floorIdentifier coordinate:(CLLocationCoordinate2D)coordinate;
Parameters
building
Building
floorIdentifier
unique identifier of the floor
coordinate
Geographical coordinate of the point
Return Value
initialized point
-
Unique identifier of the SITBuilding.
Declaration
Objective-C
@property (readwrite, strong, nonatomic) NSString *_Nonnull buildingIdentifier;
-
Unique identifier of the SITFloor.
Declaration
Objective-C
@property (readwrite, strong, nonatomic) NSString *_Nonnull floorIdentifier;
-
Returns cartesian coordinate (in meters) relative to the bounds of building’s base.
Declaration
Objective-C
@property (readwrite, strong, nonatomic) SITCartesianCoordinate *_Nullable cartesianCoordinate;
-
Name associated with the point (can be nil).
Declaration
Objective-C
@property (readwrite, strong, nonatomic) NSString *_Nullable name;
-
Check if the point refers to an indoor position.
Declaration
Objective-C
- (BOOL)isIndoor;
Return Value
BOOL value that indicates if the point is indoor (YES) or not (NO).
-
Check if the point refers to an outdoor position.
Declaration
Objective-C
- (BOOL)isOutdoor;
Return Value
BOOL value that indicates if the point is outdoor (YES) or not (NO).
-
Compute the horizontal distance between two points.
Declaration
Objective-C
- (float)distanceToPoint:(SITPoint *_Nonnull)point;
Parameters
point
the point to compute the distance to.
Return Value
distance between points (in meters).
-
Geographical coordinate
Declaration
Objective-C
- (CLLocationCoordinate2D)coordinate;
Return Value
CLLocationCoordinate2D struct