PolygonGeographicAreaObject
Objective-C
@interface PolygonGeographicAreaObject : GeographicAreaObject
Swift
class PolygonGeographicAreaObject : GeographicAreaObject
This class encapsulates polygon geographic area information.
-
Initializes and returns a newly allocated object using the coordinates array.
Declaration
Objective-C
- (nonnull instancetype)initWithCoordinates: (nonnull NSArray<CoordinatesObject *> *)array;
Swift
init(coordinates array: [CoordinatesObject])
Parameters
array
The coordinates array.
-
Get the coordinates of the polygon.
Declaration
Objective-C
- (nonnull NSArray<CoordinatesObject *> *)getCoordinates;
Swift
func getCoordinates() -> [CoordinatesObject]
-
Sets the coordinates that define the polygon.
Declaration
Objective-C
- (void)setCoordinates:(nonnull NSArray<CoordinatesObject *> *)array;
Swift
func setCoordinates(_ array: [CoordinatesObject])
-
Get the bounding box. This is the smallest rectangle that can be drawn around the area such that it surrounds this geographic area completely. @details If the area is bigger than what is allowed in the WGS 84 coordinate system, the rectangle is truncated to valid WGS 84 coordinate values. The RectangleGeographicArea is always aligned with parallels and meridians.
Declaration
Objective-C
- (nullable RectangleGeographicAreaObject *)getBoundingBox;
Swift
func getBoundingBox() -> RectangleGeographicAreaObject?