RectangleGeographicAreaObject
Objective-C
@interface RectangleGeographicAreaObject : GeographicAreaObject
Swift
class RectangleGeographicAreaObject : GeographicAreaObject
This class encapsulates rectangle geographic area information.
-
Initializes and returns a newly allocated object using location, horizontal and vertical radius.
Declaration
Objective-C
- (nonnull instancetype)initWithLocation:(nonnull CoordinatesObject *)location horizontalRadius:(double)horizRadius verticalRadius:(double)vertRadius;
Swift
init(location: CoordinatesObject, horizontalRadius horizRadius: Double, verticalRadius vertRadius: Double)
Parameters
location
The geographical location.
horizRadius
The horizontal radius in meters.
vertRadius
The vertical radius in meters.
-
Returns the coordinates for the top left point.
Declaration
Objective-C
- (nullable CoordinatesObject *)getTopLeft;
Swift
func getTopLeft() -> CoordinatesObject?
-
Returns the coordinates for the bottom right point.
Declaration
Objective-C
- (nullable CoordinatesObject *)getBottomRight;
Swift
func getBottomRight() -> CoordinatesObject?
-
Set the coordinates for the top-left point.
Declaration
Objective-C
- (void)setTopLeft:(nonnull CoordinatesObject *)location;
Swift
func setTopLeft(_ location: CoordinatesObject)
-
Set the coordinates for the bottom-right point.
Declaration
Objective-C
- (void)setBottomRight:(nonnull CoordinatesObject *)location;
Swift
func setBottomRight(_ location: CoordinatesObject)
-
Set the rectangle given by individual latitudes and longitudes.
Declaration
Objective-C
- (void)setRectangle:(double)minLatitude maxLatitude:(double)maxLatitude minLongitude:(double)minLongitude maxLongitude:(double)maxLongitude;
Swift
func setRectangle(_ minLatitude: Double, maxLatitude: Double, minLongitude: Double, maxLongitude: Double)
-
Set the rectangle given by individual latitudes and longitudes.
Declaration
Objective-C
- (void)setRectangle:(nonnull CoordinatesObject *)location horizRadius:(double)horizRadius vertRadius:(double)vertRadius;
Swift
func setRectangle(_ location: CoordinatesObject, horizRadius: Double, vertRadius: Double)
-
Check if intersects with the given rectangle geographic area.
Declaration
Objective-C
- (BOOL)intersects:(nonnull RectangleGeographicAreaObject *)rectangle;
Swift
func intersects(_ rectangle: RectangleGeographicAreaObject) -> Bool
-
Check if contains the given rectangle geographic area.
Declaration
Objective-C
- (BOOL)contains:(nonnull RectangleGeographicAreaObject *)rectangle;
Swift
func contains(_ rectangle: RectangleGeographicAreaObject) -> Bool
-
Set the current object as the intersection with the given rectangle geographic area.
Declaration
Objective-C
- (void)setIntersection:(nonnull RectangleGeographicAreaObject *)rectangle;
Swift
func setIntersection(_ rectangle: RectangleGeographicAreaObject)
-
Create a new area as the result of intersection with the given rectangle geographic area.
Declaration
Objective-C
- (nullable RectangleGeographicAreaObject *)makeIntersection: (nonnull RectangleGeographicAreaObject *)rectangle;
Swift
func makeIntersection(_ rectangle: RectangleGeographicAreaObject) -> RectangleGeographicAreaObject?
-
Create a new area as the result of union with the given rectangle geographic area.
Declaration
Objective-C
- (nullable RectangleGeographicAreaObject *)makeUnion: (nonnull RectangleGeographicAreaObject *)rectangle;
Swift
func makeUnion(_ rectangle: RectangleGeographicAreaObject) -> RectangleGeographicAreaObject?
-
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?