A set of functions for working with geometries.
More...
Inherits Finalizable.
A set of functions for working with geometries.
Definition at line 23 of file geometry_utils.dart.
◆ distanceBetweenGlobalPoints()
Get distance between GPS points.
- Parameters
-
- Returns
- distance in meters
◆ distanceBetweenPoints()
static double GeometryUtils.distanceBetweenPoints |
( |
Point | from, |
|
|
Point | to ) |
|
static |
Get distance between points.
- Parameters
-
from | start point of calculation Point |
to | end point of calculation Point |
- Returns
- distance in meters
◆ divisionRatioBySegment()
static double GeometryUtils.divisionRatioBySegment |
( |
Segment | segment1, |
|
|
Segment | segment2 ) |
|
static |
Calculate the division ratio of a segment by a given segment(if intersects)
- Parameters
-
segment1 | first segment of calculation Segment |
segment2 | second segment of calculation Segment |
- Returns
- division ratio
◆ getProjectionRatio()
static double GeometryUtils.getProjectionRatio |
( |
Segment | segment, |
|
|
Point | point ) |
|
static |
Calculate the division ratio of a segment by a given point Calculate projection point on a segment.
- Parameters
-
segment | segment of calculation Segment |
point | point of calculation Point |
- Returns
- division ratio
◆ getRatioPoint()
static Point GeometryUtils.getRatioPoint |
( |
Segment | segment, |
|
|
double | r ) |
|
static |
Calculate projection point on a segment.
- Parameters
-
segment | segment of calculation Segment |
r | division ratio |
- Returns
- ratio point Point
◆ polygonArea()
static double GeometryUtils.polygonArea |
( |
Polygon | polygon | ) |
|
|
static |
Get polygon area.
- Parameters
-
polygon | polygon object for calculation Polygon |
- Returns
- area in meters
◆ polygonCenter()
Get polygon geometric center.
- Parameters
-
polygon | polygon object for calculation Polygon |
- Returns
- center point Point
◆ polygonContainsPoint()
static bool GeometryUtils.polygonContainsPoint |
( |
Polygon | polygon, |
|
|
Point | point ) |
|
static |
Checks that polygon contains point.
- Parameters
-
polygon | polygon object in which looking for contents Polygon |
point | checking point object Point |
- Returns
- contains or not
◆ segmentIntersectionSegment()
Calculate the intersection point of two segments.
- Parameters
-
segment1 | first segment of calculation Segment |
segment2 | second segment of calculation Segment |
- Returns
- intersection point Point
◆ segmentIntersectsSegment()
static bool GeometryUtils.segmentIntersectsSegment |
( |
Segment | segment1, |
|
|
Segment | segment2 ) |
|
static |
Checks the intersection of two segments.
- Parameters
-
segment1 | first segment of calculation Segment |
segment2 | second segment of calculation Segment |
- Returns
- intersects or not
◆ segmentLength()
static double GeometryUtils.segmentLength |
( |
Segment | segment | ) |
|
|
static |
Get length of segment.
- Parameters
-
segment | segment object for calculation Segment |
- Returns
- length in meters
◆ segmentPointDistance()
static double GeometryUtils.segmentPointDistance |
( |
Segment | segment, |
|
|
Point | point ) |
|
static |
Get distance from segment to point.
- Parameters
-
segment | start segment of calculation Segment |
point | end point of calculation Point |
- Returns
- distance in meters
The documentation for this class was generated from the following file: