Functions to compute distance between basic geometric structures.
More...
#include <Distance.h>
|
static double | segmentToSegment (const geom::CoordinateXY &A, const geom::CoordinateXY &B, const geom::CoordinateXY &C, const geom::CoordinateXY &D) |
|
static double | pointToSegmentString (const geom::CoordinateXY &p, const geom::CoordinateSequence *seq) |
|
static double | pointToSegment (const geom::CoordinateXY &p, const geom::CoordinateXY &A, const geom::CoordinateXY &B) |
|
static double | pointToLinePerpendicular (const geom::CoordinateXY &p, const geom::CoordinateXY &A, const geom::CoordinateXY &B) |
|
static double | pointToLinePerpendicularSigned (const geom::CoordinateXY &p, const geom::CoordinateXY &A, const geom::CoordinateXY &B) |
|
Functions to compute distance between basic geometric structures.
- Author
- Martin Davis
◆ pointToLinePerpendicular()
static double geos::algorithm::Distance::pointToLinePerpendicular |
( |
const geom::CoordinateXY & |
p, |
|
|
const geom::CoordinateXY & |
A, |
|
|
const geom::CoordinateXY & |
B |
|
) |
| |
|
static |
Computes the perpendicular distance from a point p to the (infinite) line containing the points AB
- Parameters
-
p | the point to compute the distance for |
A | one point of the line |
B | another point of the line (must be different to A) |
- Returns
- the distance from p to line AB
◆ pointToSegment()
static double geos::algorithm::Distance::pointToSegment |
( |
const geom::CoordinateXY & |
p, |
|
|
const geom::CoordinateXY & |
A, |
|
|
const geom::CoordinateXY & |
B |
|
) |
| |
|
static |
Computes the distance from a point p to a line segment AB
Note: NON-ROBUST!
- Parameters
-
p | the point to compute the distance for |
A | one point of the line |
B | another point of the line (must be different to A) |
- Returns
- the distance from p to line segment AB
◆ pointToSegmentString()
static double geos::algorithm::Distance::pointToSegmentString |
( |
const geom::CoordinateXY & |
p, |
|
|
const geom::CoordinateSequence * |
seq |
|
) |
| |
|
static |
Computes the distance from a point to a sequence of line segments.
- Parameters
-
p | a point |
seq | a sequence of contiguous line segments defined by their vertices |
- Returns
- the minimum distance between the point and the line segments
◆ segmentToSegment()
static double geos::algorithm::Distance::segmentToSegment |
( |
const geom::CoordinateXY & |
A, |
|
|
const geom::CoordinateXY & |
B, |
|
|
const geom::CoordinateXY & |
C, |
|
|
const geom::CoordinateXY & |
D |
|
) |
| |
|
static |
Computes the distance from a line segment AB to a line segment CD
Note: NON-ROBUST!
- Parameters
-
A | a point of one line |
B | the second point of (must be different to A) |
C | one point of the line |
D | another point of the line (must be different to A) |
The documentation for this class was generated from the following file: