MapsIndoors iOS SDK V3
Loading...
Searching...
No Matches
Instance Methods | Properties | List of all members
<MPGeometryQueryProtocol> Protocol Reference

#include <MPGeometryQueryProtocol.h>

Inheritance diagram for <MPGeometryQueryProtocol>:
MPPolygonGeometry

Instance Methods

(BOOL) - containsPoint:
 
(BOOL) - containsCoordinate:
 
(BOOL) - containsCoordinate:ignorePolygonHoles:
 
(BOOL) - containsCoordinate:ignorePolygonHoles:containmentMetadata:
 
(BOOL) - containsLineSegmentFromCoordinate:toCoordinate:
 

Properties

double area
 

Method Documentation

◆ containsCoordinate:

- (BOOL) containsCoordinate: (CLLocationCoordinate2D) coordinate

Check if the given coordinate is contained within the polygon.

Parameters
coordinatecoordinate to check for containment.
Returns
YES of the coordinate is inside the polygon boundary AND outside any holes in the polygon.
NO if the coordinate is outside the polygon, or inside any holes in the polygon.

◆ containsCoordinate:ignorePolygonHoles:

- (BOOL) containsCoordinate: (CLLocationCoordinate2D) coordinate
ignorePolygonHoles: (BOOL) ignorePolygonHoles 

Check if the given coordinate is contained within the polygon.

Parameters
coordinatecoordinate to check for containment.
ignorePolygonHolesShould holes in a polygon be ignored
Returns
YES of the coordinate is inside the polygon boundary AND outside any holes in the polygon.
NO if the coordinate is outside the polygon, or inside any holes in the polygon.

◆ containsCoordinate:ignorePolygonHoles:containmentMetadata:

- (BOOL) containsCoordinate: (CLLocationCoordinate2D) coordinate
ignorePolygonHoles: (BOOL) ignorePolygonHoles
containmentMetadata: (nullable MPGeometryContainmentMetadata *) containmentMetadata 

Check if the given coordinate is contained within the polygon, and optionally return the coordinate closest to the polygon. If the polygon contains the coordinate, 'coordinate' is returned as nearestPoint. If coordinate is not contained, the nearest point is calculated.

Parameters
coordinatecoordinate to check for containment.
containmentMetadataIf not nil, the nearest point and distance on the polygon boundary is returned. Note this may be the nearest point on a polygon-hole.
ignorePolygonHolesYES to ignore polygon holes.
Returns
NO if the coordinate is outside the polygon, or inside any holes in the polygon.

◆ containsLineSegmentFromCoordinate:toCoordinate:

- (BOOL) containsLineSegmentFromCoordinate: (CLLocationCoordinate2D) u
toCoordinate: (CLLocationCoordinate2D) v 

Check if the given linesegment is fully contained within the polygon.

Parameters
ustart coordinate of linesegment to check for containment.
vend coordinate of linesegment to check for containment.
Returns
YES of the linesegment is fully inside the polygon boundary AND outside any holes in the polygon.
NO if the linesegment is not fully inside the polygon, or inside any holes in the polygon.

◆ containsPoint:

- (BOOL) containsPoint: (nonnull MPPoint *) point

Check if the given point is contained within the polygon.

Parameters
pointpoint to check for containment.
Returns
YES of the point is inside the polygon boundary AND outside any holes in the polygon.
NO if the point is outside the polygon, or inside any holes in the polygon.

Property Documentation

◆ area

- (double) area
readnonatomicassign

The area of the polygon computed as the area of the outer path with the area of all holes subtracted.