-
A rectangular area as measured on a two-dimensional map projection.
See moreDeclaration
Objective-C
struct DingiCoordinateBounds {}
Swift
struct DingiCoordinateBounds
-
Returns
YES
if the two coordinate bounds are equal to each other.Declaration
Objective-C
static inline BOOL DingiCoordinateBoundsEqualToCoordinateBounds(DingiCoordinateBounds bounds1, DingiCoordinateBounds bounds2)
Swift
func DingiCoordinateBoundsEqualToCoordinateBounds(_ bounds1: DingiCoordinateBounds, _ bounds2: DingiCoordinateBounds) -> Bool
-
Returns the area spanned by the coordinate bounds.
Declaration
Objective-C
static inline DingiCoordinateSpan DingiCoordinateBoundsGetCoordinateSpan(DingiCoordinateBounds bounds)
Swift
func DingiCoordinateBoundsGetCoordinateSpan(_ bounds: DingiCoordinateBounds) -> DingiCoordinateSpan
-
Returns
YES
if the two coordinate bounds intersect.Declaration
Objective-C
static inline BOOL DingiCoordinateBoundsIntersectsCoordinateBounds(DingiCoordinateBounds bounds1, DingiCoordinateBounds bounds2)
Swift
func DingiCoordinateBoundsIntersectsCoordinateBounds(_ bounds1: DingiCoordinateBounds, _ bounds2: DingiCoordinateBounds) -> Bool
-
Returns
YES
if the coordinate bounds covers no area.Note
A bounds may be empty but have a non-zero coordinate span (e.g., when its northeast point lies due north of its southwest point).Declaration
Objective-C
static inline BOOL DingiCoordinateBoundsIsEmpty(DingiCoordinateBounds bounds)
Swift
func DingiCoordinateBoundsIsEmpty(_ bounds: DingiCoordinateBounds) -> Bool
-
Creates a new
DingiCoordinateBounds
structure from the given southwest and northeast coordinates.Declaration
Objective-C
static inline DingiCoordinateBounds DingiCoordinateBoundsMake(CLLocationCoordinate2D sw, CLLocationCoordinate2D ne)
Swift
func DingiCoordinateBoundsMake(_ sw: CLLocationCoordinate2D, _ ne: CLLocationCoordinate2D) -> DingiCoordinateBounds
-
Returns a coordinate bounds with southwest and northeast coordinates that are offset from those of the source bounds.
Declaration
Objective-C
static inline DingiCoordinateBounds DingiCoordinateBoundsOffset(DingiCoordinateBounds bounds, DingiCoordinateSpan offset)
Swift
func DingiCoordinateBoundsOffset(_ bounds: DingiCoordinateBounds, _ offset: DingiCoordinateSpan) -> DingiCoordinateBounds
-
Returns
YES
if the coordinate is within the coordinate bounds.Declaration
Objective-C
static inline BOOL DingiCoordinateInCoordinateBounds(CLLocationCoordinate2D coordinate, DingiCoordinateBounds bounds)
Swift
func DingiCoordinateInCoordinateBounds(_ coordinate: CLLocationCoordinate2D, _ bounds: DingiCoordinateBounds) -> Bool
-
A quadrilateral area as measured on a two-dimensional map projection.
See moreDingiCoordinateQuad
differs fromDingiCoordinateBounds
in that it allows representation of non-axis aligned bounds and non-rectangular quadrilaterals. The coordinates are described in counter clockwise order from top left.Declaration
Objective-C
struct DingiCoordinateQuad {}
Swift
struct DingiCoordinateQuad
-
Creates a new
DingiCoordinateQuad
structure from the given top left, bottom left, bottom right, and top right coordinates.Declaration
Objective-C
static inline DingiCoordinateQuad DingiCoordinateQuadMake( CLLocationCoordinate2D topLeft, CLLocationCoordinate2D bottomLeft, CLLocationCoordinate2D bottomRight, CLLocationCoordinate2D topRight)
Swift
func DingiCoordinateQuadMake(_ topLeft: CLLocationCoordinate2D, _ bottomLeft: CLLocationCoordinate2D, _ bottomRight: CLLocationCoordinate2D, _ topRight: CLLocationCoordinate2D) -> DingiCoordinateQuad
-
Creates a new
DingiCoordinateQuad
structure from the givenDingiCoordinateBounds
. The returned quad uses the bounds’ northeast coordinate as the top right, and the southwest coordinate at the bottom left.Declaration
Objective-C
static inline DingiCoordinateQuad DingiCoordinateQuadFromCoordinateBounds(DingiCoordinateBounds bounds)
Swift
func DingiCoordinateQuadFromCoordinateBounds(_ bounds: DingiCoordinateBounds) -> DingiCoordinateQuad
-
Defines the area spanned by an
See moreDingiCoordinateBounds
.Declaration
Objective-C
struct DingiCoordinateSpan {}
Swift
struct DingiCoordinateSpan
-
Returns
YES
if the two coordinate spans represent the same latitudinal change and the same longitudinal change.Declaration
Objective-C
static inline BOOL DingiCoordinateSpanEqualToCoordinateSpan(DingiCoordinateSpan span1, DingiCoordinateSpan span2)
Swift
func DingiCoordinateSpanEqualToCoordinateSpan(_ span1: DingiCoordinateSpan, _ span2: DingiCoordinateSpan) -> Bool
-
Creates a new
DingiCoordinateSpan
from the given latitudinal and longitudinal deltas.Declaration
Objective-C
static inline DingiCoordinateSpan DingiCoordinateSpanMake(CLLocationDegrees latitudeDelta, CLLocationDegrees longitudeDelta)
Swift
func DingiCoordinateSpanMake(_ latitudeDelta: CLLocationDegrees, _ longitudeDelta: CLLocationDegrees) -> DingiCoordinateSpan
-
An area of zero width and zero height.
Declaration
Objective-C
extern const DingiCoordinateSpan DingiCoordinateSpanZero
Swift
let DingiCoordinateSpanZero: DingiCoordinateSpan
-
Returns degrees, converted from radians.
Declaration
Objective-C
static inline CLLocationDegrees DingiDegreesFromRadians(CGFloat radians)
Swift
func DingiDegreesFromRadians(_ radians: CGFloat) -> CLLocationDegrees
-
Returns radians, converted from degrees.
Declaration
Objective-C
static inline CGFloat DingiRadiansFromDegrees(CLLocationDegrees degrees)
Swift
func DingiRadiansFromDegrees(_ degrees: CLLocationDegrees) -> CGFloat
-
Returns a formatted string for the given coordinate bounds.
Declaration
Objective-C
static inline NSString *_Nonnull DingiStringFromCoordinateBounds( DingiCoordinateBounds bounds)
Swift
func DingiStringFromCoordinateBounds(_ bounds: DingiCoordinateBounds) -> String
-
Returns a formatted string for the given coordinate quad.
Declaration
Objective-C
static inline NSString *_Nonnull DingiStringFromCoordinateQuad( DingiCoordinateQuad quad)
Swift
func DingiStringFromCoordinateQuad(_ quad: DingiCoordinateQuad) -> String