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, strong] NMAGeoCoordinates bottomLeft

The NMAGeoCoordinates representing the bottom-left corner of the NMAGeoBoundingBox

[readable, writable, strong] NMAGeoCoordinates bottomRight

The NMAGeoCoordinates representing the bottom-right 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, strong] NMAGeoCoordinates topLeft

The NMAGeoCoordinates representing the top-left corner of the NMAGeoBoundingBox

[readable, writable, strong] 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:( NMAGeoBoundingBox *) boundingBox

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

-(BOOL) containsGeoCoordinates:( NMAGeoCoordinates *) coordinates

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

-(id) initWithTopLeft:( NMAGeoCoordinates *) topLeft bottomRight:( NMAGeoCoordinates *) bottomRight

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

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

Computes the intersection of this and another NMAGeoBoundingBox

-(BOOL) intersectsGeoBoundingBox:( 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:( NMAGeoBoundingBox *) boundingBox

Determines whether this NMAGeoBoundingBox is equal to another

Class Method Summary

Table 3. Class Methods
Class Methods

+(id) geoBoundingBoxContainingGeoBoundingBoxes:(NSArray *) boxes

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

+(id) geoBoundingBoxContainingGeoCoordinates:(NSArray *) coordinates

Constructs a NMAGeoBoundingBox which contains all coordinates in an array.

+(id) geoBoundingBoxWithCenter:( NMAGeoCoordinates *) center width:(float) width height:(float) height

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

+(id) geoBoundingBoxWithTopLeft:( NMAGeoCoordinates *) topLeft bottomRight:( NMAGeoCoordinates *) bottomRight

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

+(id) geoBoundingBoxWithTopRight:( NMAGeoCoordinates *) topRight bottomLeft:( 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, strong] NMAGeoCoordinatesbottomLeft

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

[readable, writable, strong] NMAGeoCoordinatesbottomRight

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

[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, strong] NMAGeoCoordinatestopLeft

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

[readable, writable, strong] 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:( 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:( 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

-(id) initWithTopLeft:( NMAGeoCoordinates *) topLeft bottomRight:( 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

-( NMAGeoBoundingBox *) intersectionWithGeoBoundingBox:( 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:( 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:( NMAGeoBoundingBox *) boundingBox

Determines whether this NMAGeoBoundingBox is equal to another.

Returns:

YES if the bounding boxes are equal, NO otherwise

Class Method Details

+(id) geoBoundingBoxContainingGeoBoundingBoxes:(NSArray *) 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

+(id) geoBoundingBoxContainingGeoCoordinates:(NSArray *) 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

+(id) geoBoundingBoxWithCenter:( 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

+(id) geoBoundingBoxWithTopLeft:( NMAGeoCoordinates *) topLeft bottomRight:( 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

+(id) geoBoundingBoxWithTopRight:( NMAGeoCoordinates *) topRight bottomLeft:( 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.