C# Класс Mapsui.Geometries.Utilities.CGAlgorithms

Specifies and implements various fundamental Computational Geometric algorithms. The algorithms supplied in this class are robust for double-precision floating point.
Показать файл Открыть проект

Открытые методы

Метод Описание
ClosestPoint ( System.Point p, System.Point lineSegFrom, System.Point lineSegTo ) : System.Point

Computes the closest point on this line segment to another point.

DistanceLineLine ( System.Point a, System.Point b, System.Point c, System.Point d ) : double

Computes the distance from a line segment AB to a line segment CD. Note: NON-ROBUST!

DistancePointLine ( System.Point p, System.Point a, System.Point b ) : double

Computes the distance from a point p to a line segment AB. Note: NON-ROBUST!

DistancePointLinePerpendicular ( System.Point p, System.Point a, System.Point b ) : double

Computes the perpendicular distance from a point p to the (infinite) line containing the points AB

Length ( IList pts ) : double

Computes the length of a linestring specified by a sequence of points.

Project ( System.Point p, System.Point lineSegFrom, System.Point lineSegTo ) : System.Point

Compute the projection of a point onto the line determined by this line segment. Note that the projected point may lie outside the line segment. If this is the case, the projection factor will lie outside the range [0.0, 1.0].

ProjectionFactor ( System.Point p, System.Point lineSegFrom, System.Point lineSegTo ) : double

Compute the projection factor for the projection of the point p onto this LineSegment. The projection factor is the constant k by which the vector for this segment must be multiplied to equal the vector for the projection of p.

SignedArea ( System.Point ring ) : double

Returns the signed area for a ring. The area is positive ifthe ring is oriented CW.

Описание методов

ClosestPoint() публичный статический Метод

Computes the closest point on this line segment to another point.
public static ClosestPoint ( System.Point p, System.Point lineSegFrom, System.Point lineSegTo ) : System.Point
p System.Point
lineSegFrom System.Point
lineSegTo System.Point
Результат System.Point

DistanceLineLine() публичный статический Метод

Computes the distance from a line segment AB to a line segment CD. Note: NON-ROBUST!
public static DistanceLineLine ( System.Point a, System.Point b, System.Point c, System.Point d ) : double
a System.Point A point of one line.
b System.Point The second point of the line (must be different to A).
c System.Point One point of the line.
d System.Point Another point of the line (must be different to A).
Результат double

DistancePointLine() публичный статический Метод

Computes the distance from a point p to a line segment AB. Note: NON-ROBUST!
public static DistancePointLine ( System.Point p, System.Point a, System.Point b ) : double
p System.Point The point to compute the distance for.
a System.Point One point of the line.
b System.Point Another point of the line (must be different to A).
Результат double

DistancePointLinePerpendicular() публичный статический Метод

Computes the perpendicular distance from a point p to the (infinite) line containing the points AB
public static DistancePointLinePerpendicular ( System.Point p, System.Point a, System.Point b ) : double
p System.Point The point to compute the distance for.
a System.Point One point of the line.
b System.Point Another point of the line (must be different to A).
Результат double

Length() публичный статический Метод

Computes the length of a linestring specified by a sequence of points.
public static Length ( IList pts ) : double
pts IList The points specifying the linestring.
Результат double

Project() публичный статический Метод

Compute the projection of a point onto the line determined by this line segment. Note that the projected point may lie outside the line segment. If this is the case, the projection factor will lie outside the range [0.0, 1.0].
public static Project ( System.Point p, System.Point lineSegFrom, System.Point lineSegTo ) : System.Point
p System.Point
lineSegFrom System.Point
lineSegTo System.Point
Результат System.Point

ProjectionFactor() публичный статический Метод

Compute the projection factor for the projection of the point p onto this LineSegment. The projection factor is the constant k by which the vector for this segment must be multiplied to equal the vector for the projection of p.
public static ProjectionFactor ( System.Point p, System.Point lineSegFrom, System.Point lineSegTo ) : double
p System.Point
lineSegFrom System.Point
lineSegTo System.Point
Результат double

SignedArea() публичный статический Метод

Returns the signed area for a ring. The area is positive ifthe ring is oriented CW.
public static SignedArea ( System.Point ring ) : double
ring System.Point
Результат double