Loading...
Searching...
No Matches

A set of functions for working with geometries. More...

#include <com/navigine/idl/objc/NCGeometryUtils.h>

Inherits NSObject.

Class Methods

(float) + distanceBetweenGlobalPoints:to:
 Get distance between GPS points.
 
(float) + distanceBetweenPoints:to:
 Get distance between points.
 
(float) + segmentLength:
 Get length of segment.
 
(float) + polygonArea:
 Get polygon area.
 
(nonnull NCPoint *) + polygonCenter:
 Get polygon geometric center.
 
(BOOL) + polygonContainsPoint:point:
 Checks that polygon contains point.
 
(float) + segmentPointDistance:point:
 Get distance from segment to point.
 
(BOOL) + segmentIntersectsSegment:segment2:
 Checks the intersection of two segments.
 
(nonnull NCPoint *) + segmentIntersectionSegment:segment2:
 Calculate the intersection point of two segments.
 
(float) + divisionRatioBySegment:segment2:
 Calculate the division ratio of a segment by a given segment(if intersects)
 
(nonnull NCPoint *) + getRatioPoint:r:
 Calculate projection point on a segment.
 
(double) + getProjectionRatio:point:
 Calculate the division ratio of a segment by a given point Calculate projection point on a segment.
 

Detailed Description

A set of functions for working with geometries.

Definition at line 21 of file NCGeometryUtils.h.

Method Documentation

◆ distanceBetweenGlobalPoints:to:

+ (float) distanceBetweenGlobalPoints: (nonnull NCGlobalPoint *) from
to: (nonnull NCGlobalPoint *) to 

Get distance between GPS points.

Parameters
fromstart point of calculation GlobalPoint
toend point of calculation GlobalPoint
Returns
distance in meters

◆ distanceBetweenPoints:to:

+ (float) distanceBetweenPoints: (nonnull NCPoint *) from
to: (nonnull NCPoint *) to 

Get distance between points.

Parameters
fromstart point of calculation Point
toend point of calculation Point
Returns
distance in meters

◆ divisionRatioBySegment:segment2:

+ (float) divisionRatioBySegment: (nonnull NCSegment *) segment1
segment2: (nonnull NCSegment *) segment2 

Calculate the division ratio of a segment by a given segment(if intersects)

Parameters
segment1first segment of calculation Segment
segment2second segment of calculation Segment
Returns
division ratio

◆ getProjectionRatio:point:

+ (double) getProjectionRatio: (nonnull NCSegment *) segment
point: (nonnull NCPoint *) point 

Calculate the division ratio of a segment by a given point Calculate projection point on a segment.

Parameters
segmentsegment of calculation Segment
pointpoint of calculation Point
Returns
division ratio

◆ getRatioPoint:r:

+ (nonnull NCPoint *) getRatioPoint: (nonnull NCSegment *) segment
r: (double) r 

Calculate projection point on a segment.

Parameters
segmentsegment of calculation Segment
rdivision ratio
Returns
ratio point Point

◆ polygonArea:

+ (float) polygonArea: (nonnull NCPolygon *) polygon

Get polygon area.

Parameters
polygonpolygon object for calculation Polygon
Returns
area in meters

◆ polygonCenter:

+ (nonnull NCPoint *) polygonCenter: (nonnull NCPolygon *) polygon

Get polygon geometric center.

Parameters
polygonpolygon object for calculation Polygon
Returns
center point Point

◆ polygonContainsPoint:point:

+ (BOOL) polygonContainsPoint: (nonnull NCPolygon *) polygon
point: (nonnull NCPoint *) point 

Checks that polygon contains point.

Parameters
polygonpolygon object in which looking for contents Polygon
pointchecking point object Point
Returns
contains or not

◆ segmentIntersectionSegment:segment2:

+ (nonnull NCPoint *) segmentIntersectionSegment: (nonnull NCSegment *) segment1
segment2: (nonnull NCSegment *) segment2 

Calculate the intersection point of two segments.

Parameters
segment1first segment of calculation Segment
segment2second segment of calculation Segment
Returns
intersection point Point

◆ segmentIntersectsSegment:segment2:

+ (BOOL) segmentIntersectsSegment: (nonnull NCSegment *) segment1
segment2: (nonnull NCSegment *) segment2 

Checks the intersection of two segments.

Parameters
segment1first segment of calculation Segment
segment2second segment of calculation Segment
Returns
intersects or not

◆ segmentLength:

+ (float) segmentLength: (nonnull NCSegment *) segment

Get length of segment.

Parameters
segmentsegment object for calculation Segment
Returns
length in meters

◆ segmentPointDistance:point:

+ (float) segmentPointDistance: (nonnull NCSegment *) segment
point: (nonnull NCPoint *) point 

Get distance from segment to point.

Parameters
segmentstart segment of calculation Segment
pointend point of calculation Point
Returns
distance in meters

The documentation for this class was generated from the following file: