Loading...
Searching...
No Matches
GeometryUtils Class Referenceabstract

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

Inherits Finalizable.

Static Public Member Functions

static double distanceBetweenGlobalPoints (GlobalPoint from, GlobalPoint to)
 Get distance between GPS points.
 
static double distanceBetweenPoints (Point from, Point to)
 Get distance between points.
 
static double segmentLength (Segment segment)
 Get length of segment.
 
static double polygonArea (Polygon polygon)
 Get polygon area.
 
static Point polygonCenter (Polygon polygon)
 Get polygon geometric center.
 
static bool polygonContainsPoint (Polygon polygon, Point point)
 Checks that polygon contains point.
 
static double segmentPointDistance (Segment segment, Point point)
 Get distance from segment to point.
 
static bool segmentIntersectsSegment (Segment segment1, Segment segment2)
 Checks the intersection of two segments.
 
static Point segmentIntersectionSegment (Segment segment1, Segment segment2)
 Calculate the intersection point of two segments.
 
static double divisionRatioBySegment (Segment segment1, Segment segment2)
 Calculate the division ratio of a segment by a given segment(if intersects)
 
static Point getRatioPoint (Segment segment, double r)
 Calculate projection point on a segment.
 
static double getProjectionRatio (Segment segment, Point 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 23 of file geometry_utils.dart.

Member Function Documentation

◆ distanceBetweenGlobalPoints()

static double GeometryUtils.distanceBetweenGlobalPoints ( GlobalPoint from,
GlobalPoint to )
static

Get distance between GPS points.

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

◆ distanceBetweenPoints()

static double GeometryUtils.distanceBetweenPoints ( Point from,
Point to )
static

Get distance between points.

Parameters
fromstart point of calculation Point
toend 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
segment1first segment of calculation Segment
segment2second 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
segmentsegment of calculation Segment
pointpoint of calculation Point
Returns
division ratio

◆ getRatioPoint()

static Point GeometryUtils.getRatioPoint ( Segment segment,
double r )
static

Calculate projection point on a segment.

Parameters
segmentsegment of calculation Segment
rdivision ratio
Returns
ratio point Point

◆ polygonArea()

static double GeometryUtils.polygonArea ( Polygon polygon)
static

Get polygon area.

Parameters
polygonpolygon object for calculation Polygon
Returns
area in meters

◆ polygonCenter()

static Point GeometryUtils.polygonCenter ( Polygon polygon)
static

Get polygon geometric center.

Parameters
polygonpolygon object for calculation Polygon
Returns
center point Point

◆ polygonContainsPoint()

static bool GeometryUtils.polygonContainsPoint ( Polygon polygon,
Point point )
static

Checks that polygon contains point.

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

◆ segmentIntersectionSegment()

static Point GeometryUtils.segmentIntersectionSegment ( Segment segment1,
Segment segment2 )
static

Calculate the intersection point of two segments.

Parameters
segment1first segment of calculation Segment
segment2second 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
segment1first segment of calculation Segment
segment2second segment of calculation Segment
Returns
intersects or not

◆ segmentLength()

static double GeometryUtils.segmentLength ( Segment segment)
static

Get length of segment.

Parameters
segmentsegment 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
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: