HERE iOS SDK Developer's Guide

NMAGeoBoundingBox

Class Summary

class NMAGeoBoundingBox

Derived from: NSObject, <NSCoding>

Represents a bounding box that defines a rectangular area in a geographic coordinate system.

Include: NMAKit.framework/headers/NMAGeoBoundingBox.h

Inheritance Diagrams

Figure 1. Public inheritance diagram for NMAGeoBoundingBox

[For complete information, see the section Class Details]

Public Property Summary

Table 1. Public Properties
Public Properties

[readable, writable, assign] NMAGeoCoordinates bottomLeft

The NMAGeoCoordinates representing the bottom-left corner of the NMAGeoBoundingBox

[readable, writable, assign] NMAGeoCoordinates bottomRight

The NMAGeoCoordinates representing the bottom-right corner of the NMAGeoBoundingBox

[readable, assign] NMAGeoCoordinates bottomRightBack

The NMAGeoCoordinates representing the bottom-right-back corner of the NMAGeoBoundingBox

[readable, weak] NMAGeoCoordinates center

The NMAGeoCoordinates representing the center of the NAMGeoBoundingBox

[readable, assign] BOOL  crossesInternationalDateLine

[readable, assign] double  height

The NMAGeoBoundingBox height, in degrees

[readable, writable, assign] NMAGeoCoordinates topLeft

The NMAGeoCoordinates representing the top-left corner of the NMAGeoBoundingBox

[readable, assign] NMAGeoCoordinates topLeftFront

The NMAGeoCoordinates representing the top-left-front corner of the NMAGeoBoundingBox

[readable, writable, assign] NMAGeoCoordinates topRight

The NMAGeoCoordinates representing the top-right corner of the NMAGeoBoundingBox

[readable, assign] double  width

The NMAGeoBoundingBox width, in degrees

Instance Method Summary

Table 2. Instance Methods
Instance Method Summary

-(BOOL) containsGeoBoundingBox:(nonnull NMAGeoBoundingBox *) boundingBox

Determines whether the specified NMAGeoBoundingBox is covered entirely by this NMAGeoBoundingBox (boundary included)

-(BOOL) containsGeoCoordinates:(nonnull NMAGeoCoordinates *) coordinates

Determines whether the specified NMAGeoCoordinates object is contained within this NMAGeoBoundingBox (boundary included)

-(nonnull) init

Initialize an NMAGeoBoundingBox instance

-(nullable) initContainingGeoBoundingBoxes:(nonnull NSArray< NMAGeoBoundingBox * > *) boxes

Initializes a NMAGeoBoundingBox which contains all bounding boxes in an array.

-(nullable) initContainingGeoCoordinates:(nonnull NSArray< NMAGeoCoordinates * > *) coordinates

Initializes a NMAGeoBoundingBox which contains all coordinates in an array.

-(nullable) initWithCenter:(nonnull NMAGeoCoordinates *) center width:(float) width height:(float) height

Initializes a NMAGeoBoundingBox from a NMAGeoCoordinates center point and a height and width in degrees

-(nullable) initWithTopLeft:(nonnull NMAGeoCoordinates *) topLeft bottomRight:(nonnull NMAGeoCoordinates *) bottomRight

Initializes a NMAGeoBoundingBox instance with specified top-left and bottom-right NMAGeoCoordinates

-(nullable) initWithTopRight:(nonnull NMAGeoCoordinates *) topRight bottomLeft:(nonnull NMAGeoCoordinates *) bottomLeft

Initializes a NMAGeoBoundingBox from NMAGeoCoordinates defining its top right and bottom left corners

-(nullable NMAGeoBoundingBox *) intersectionWithGeoBoundingBox:(nonnull NMAGeoBoundingBox *) boundingBox

Computes the intersection of this and another NMAGeoBoundingBox

-(BOOL) intersectsGeoBoundingBox:(nonnull NMAGeoBoundingBox *) boundingBox

Determines whether the intesection of this NMAGeoBoundingBox and the specified NMAGeoBoundingBox is non-empty

-(BOOL) isEmpty

Determines whether the size of the enclosed NMAGeoBoundingBox is 0

-(BOOL) isEqualToGeoBoundingBox:(nonnull NMAGeoBoundingBox *) boundingBox

Determines whether this NMAGeoBoundingBox is equal to another

Class Method Summary

Table 3. Class Methods
Class Methods

+(nullable) geoBoundingBoxContainingGeoBoundingBoxes:(nonnull NSArray< NMAGeoBoundingBox * > *) boxes

Constructs a NMAGeoBoundingBox which contains all bounding boxes in an array.

+(nullable) geoBoundingBoxContainingGeoCoordinates:(nonnull NSArray< NMAGeoCoordinates * > *) coordinates

Constructs a NMAGeoBoundingBox which contains all coordinates in an array.

+(nullable) geoBoundingBoxWithCenter:(nonnull NMAGeoCoordinates *) center width:(float) width height:(float) height

Constructs a NMAGeoBoundingBox from a NMAGeoCoordinates center point and a height and width in degrees

+(nullable) geoBoundingBoxWithTopLeft:(nonnull NMAGeoCoordinates *) topLeft bottomRight:(nonnull NMAGeoCoordinates *) bottomRight

Constructs a NMAGeoBoundingBox from NMAGeoCoordinates defining its top left and bottom right corners

+(nullable) geoBoundingBoxWithTopRight:(nonnull NMAGeoCoordinates *) topRight bottomLeft:(nonnull NMAGeoCoordinates *) bottomLeft

Constructs a NMAGeoBoundingBox from NMAGeoCoordinates defining its top right and bottom left corners

Class Details

Represents a bounding box that defines a rectangular area in a geographic coordinate system.

Although the bounding box is specified by its top-left and bottom-right corner, the box is not necessarily the smallest rectangle spanned by these two points. It is possible to define bounding boxes that are wider than 180 degrees or higher than 90 degrees (e.g. by set ting the longitude of top-left corner to a bigger value than the longitude of the bottom-right corner).

For example, a bounding box with a longitude of -180 degrees for the top- left corner and a longitude of 180 degrees for the bottom-right corner will construct an area the encircles the globe, whereas a bounding box with the same longitude values for both corners will construct a bounding box with a width of 0 degrees.

Public Property Details

[readable, writable, assign] NMAGeoCoordinatesbottomLeft

The NMAGeoCoordinates representing the bottom-left corner of the NMAGeoBoundingBox.

[readable, writable, assign] NMAGeoCoordinatesbottomRight

The NMAGeoCoordinates representing the bottom-right corner of the NMAGeoBoundingBox.

[readable, assign] NMAGeoCoordinatesbottomRightBack

The NMAGeoCoordinates representing the bottom-right-back corner of the NMAGeoBoundingBox. The altitude of this geocoordinate will be valid only when the NMAGeoBoundingBox was created with this information.

[readable, weak] NMAGeoCoordinatescenter

The NMAGeoCoordinates representing the center of the NAMGeoBoundingBox.

[readable, assign] BOOL crossesInternationalDateLine

Indicates whether this NMAGeoBoundingBox crosses the international date line

[readable, assign] double height

The NMAGeoBoundingBox height, in degrees.

[readable, writable, assign] NMAGeoCoordinatestopLeft

The NMAGeoCoordinates representing the top-left corner of the NMAGeoBoundingBox.

[readable, assign] NMAGeoCoordinatestopLeftFront

The NMAGeoCoordinates representing the top-left-front corner of the NMAGeoBoundingBox. The altitude of this geocoordinate will be valid only when the NMAGeoBoundingBox was created with this information.

[readable, writable, assign] NMAGeoCoordinatestopRight

The NMAGeoCoordinates representing the top-right corner of the NMAGeoBoundingBox.

[readable, assign] double width

The NMAGeoBoundingBox width, in degrees.

Instance Method Details

-(BOOL) containsGeoBoundingBox:(nonnull NMAGeoBoundingBox *) boundingBox

Determines whether the specified NMAGeoBoundingBox is covered entirely by this NMAGeoBoundingBox (boundary included).

Parameters:

  • boundingBox

    A NMAGeoBoundingBox to check for containment within this NMAGeoBoundingBox

Returns:

YES if contained within the NMAGeoBoundingBox, NO otherwise

-(BOOL) containsGeoCoordinates:(nonnull NMAGeoCoordinates *) coordinates

Determines whether the specified NMAGeoCoordinates object is contained within this NMAGeoBoundingBox (boundary included).

Parameters:

  • coordinates

    A NMAGeoCoordindates object to check for containment within this NMAGeoBoundingBox

Returns:

YES if contained within the NMAGeoBoundingBox, NO otherwise

-(nonnull) init

Initialize an NMAGeoBoundingBox instance.

-(nullable) initContainingGeoBoundingBoxes:(nonnull NSArray< NMAGeoBoundingBox * > *) boxes

Initializes a NMAGeoBoundingBox which contains all bounding boxes in an array.

The constructed NMAGeoBoundingBox will be the smallest possible box which contains all the NMAGeoBoundingBoxes in the input array.

Parameters:

Returns:

The NMAGeoBoundingBox

-(nullable) initContainingGeoCoordinates:(nonnull NSArray< NMAGeoCoordinates * > *) coordinates

Initializes a NMAGeoBoundingBox which contains all coordinates in an array.

The constructed NMAGeoBoundingBox will be the smallest possible box which contains all the NMAGeoCoordinates in the input array.

Parameters:

Returns:

The NMAGeoBoundingBox

-(nullable) initWithCenter:(nonnull NMAGeoCoordinates *) center width:(float) width height:(float) height

Initializes a NMAGeoBoundingBox from a NMAGeoCoordinates center point and a height and width in degrees.

Note:

If the specified values produce a box with top edge latitude > 90 or bottom edge latitude < -90, the box will be clamped to that range. If the top edge latitude is less than the bottom edge latitude, nil will be returned.

Parameters:

  • center

    The NMAGeoCoordinates representing the center of the bounding box

  • width

    The width of the bounding box in degrees longitude

  • height

    The height of the bounding box in degrees latitude

Returns:

The NMAGeoBoundingBox if the inputs are valid, else nil

-(nullable) initWithTopLeft:(nonnull NMAGeoCoordinates *) topLeft bottomRight:(nonnull NMAGeoCoordinates *) bottomRight

Initializes a NMAGeoBoundingBox instance with specified top-left and bottom-right NMAGeoCoordinates.

Parameters:

  • topLeft

    A top-left NMAGeoCoordinates value for the new NMAGeoBoundingBox

  • bottomRight

    A bottom-right NMAGeoCoordinates value for the new NMAGeoBoundingBox

Returns:

The NMAGeoBoundingBox

-(nullable) initWithTopRight:(nonnull NMAGeoCoordinates *) topRight bottomLeft:(nonnull NMAGeoCoordinates *) bottomLeft

Initializes a NMAGeoBoundingBox from NMAGeoCoordinates defining its top right and bottom left corners.

Parameters:

  • topRight

    The NMAGeoCoordinates representing the top right corner of the bounding box

  • bottomLeft

    The NMAGeoCoordinates representing the bottom left corner of the bounding box

Returns:

The NMAGeoBoundingBox

-(nullable NMAGeoBoundingBox *) intersectionWithGeoBoundingBox:(nonnull NMAGeoBoundingBox *) boundingBox

Computes the intersection of this and another NMAGeoBoundingBox.

Note:

The interection may have zero area.

Parameters:

Returns:

The NMAGeoBoundingBox representing the intersection, or nil if the boxes do not uniquely intersect

-(BOOL) intersectsGeoBoundingBox:(nonnull NMAGeoBoundingBox *) boundingBox

Determines whether the intesection of this NMAGeoBoundingBox and the specified NMAGeoBoundingBox is non-empty.

Parameters:

  • boundingBox

    A NMAGeoBoundingBox to check for intersection with this NMAGeoBoundingBox

Returns:

YES if the intersection of NMAGeoBoundingBox objects is non-empty, NO otherwise

-(BOOL) isEmpty

Determines whether the size of the enclosed NMAGeoBoundingBox is 0.

Returns:

YES if the size of the enclosed area is 0, NO otherwise

-(BOOL) isEqualToGeoBoundingBox:(nonnull NMAGeoBoundingBox *) boundingBox

Determines whether this NMAGeoBoundingBox is equal to another.

Returns:

YES if the bounding boxes are equal, NO otherwise

Class Method Details

+(nullable) geoBoundingBoxContainingGeoBoundingBoxes:(nonnull NSArray< NMAGeoBoundingBox * > *) boxes

Constructs a NMAGeoBoundingBox which contains all bounding boxes in an array.

The constructed NMAGeoBoundingBox will be the smallest possible box which contains all the NMAGeoBoundingBoxes in the input array.

Parameters:

Returns:

The NMAGeoBoundingBox

+(nullable) geoBoundingBoxContainingGeoCoordinates:(nonnull NSArray< NMAGeoCoordinates * > *) coordinates

Constructs a NMAGeoBoundingBox which contains all coordinates in an array.

The constructed NMAGeoBoundingBox will be the smallest possible box which contains all the NMAGeoCoordinates in the input array.

Parameters:

Returns:

The NMAGeoBoundingBox

+(nullable) geoBoundingBoxWithCenter:(nonnull NMAGeoCoordinates *) center width:(float) width height:(float) height

Constructs a NMAGeoBoundingBox from a NMAGeoCoordinates center point and a height and width in degrees.

Note:

If the specified values produce a box with top edge latitude > 90 or bottom edge latitude < -90, the box will be clamped to that range. If the top edge latitude is less than the bottom edge latitude, nil will be returned.

Parameters:

  • center

    The NMAGeoCoordinates representing the center of the bounding box

  • width

    The width of the bounding box in degrees longitude

  • height

    The height of the bounding box in degrees latitude

Returns:

The NMAGeoBoundingBox if the inputs are valid, else nil

+(nullable) geoBoundingBoxWithTopLeft:(nonnull NMAGeoCoordinates *) topLeft bottomRight:(nonnull NMAGeoCoordinates *) bottomRight

Constructs a NMAGeoBoundingBox from NMAGeoCoordinates defining its top left and bottom right corners.

Parameters:

  • topLeft

    The NMAGeoCoordinates representing the top left corner of the bounding box

  • bottomRight

    The NMAGeoCoordinates representing the bottom right corner of the bounding box

Returns:

The NMAGeoBoundingBox

+(nullable) geoBoundingBoxWithTopRight:(nonnull NMAGeoCoordinates *) topRight bottomLeft:(nonnull NMAGeoCoordinates *) bottomLeft

Constructs a NMAGeoBoundingBox from NMAGeoCoordinates defining its top right and bottom left corners.

Parameters:

  • topRight

    The NMAGeoCoordinates representing the top right corner of the bounding box

  • bottomLeft

    The NMAGeoCoordinates representing the bottom left corner of the bounding box

Returns:

The NMAGeoBoundingBox

You cannot use this account to purchase a commercial plan on Developer Portal, as it is already associated to plans with different payment methods.

To purchase a commercial plan on Developer Portal, please register for or sign in with a different HERE Account.

Something took longer than expected.

The project should be available soon under your projects page.

Sorry, our services are not available in this region.

Something seems to have gone wrong. Please try again later.

We've detected that your account is set to Australian Dollars (AUD).
Unfortunately, we do not offer checkouts in AUD anymore.
You can continue using your current plan as normal, but to subscribe to one of our new plans,
please register for a new HERE account or contact us for billing questions on selfservesupport@here.com.