Class PointPairDistance
Contains a pair of points and the distance between them.
Inherited Members
Namespace: NetTopologySuite.Algorithm.Distance
Assembly: NetTopologySuite.dll
Syntax
public class PointPairDistance
Remarks
Provides methods to update with a new point pair with either maximum or minimum distance.
Properties
| Edit this page View SourceCoordinates
Gets a value indicating the paired coordinates.
Declaration
public Coordinate[] Coordinates { get; }
Property Value
Type | Description |
---|---|
Coordinate[] | An array containing the paired points |
Distance
The distance between the paired coordinates
Declaration
public double Distance { get; }
Property Value
Type | Description |
---|---|
double | The distance between the paired coordinates |
this[int]
Gets the value of one of the paired points
Declaration
public Coordinate this[int i] { get; }
Parameters
Type | Name | Description |
---|---|---|
int | i | An index, valid are [0, 1]. |
Property Value
Type | Description |
---|---|
Coordinate | The |
Methods
| Edit this page View SourceInitialize()
Initializes this instance to null.
Declaration
public void Initialize()
Initialize(Coordinate, Coordinate)
Initializes the points, computing the distance between them.
Declaration
public void Initialize(Coordinate p0, Coordinate p1)
Parameters
Type | Name | Description |
---|---|---|
Coordinate | p0 | 1st coordinate |
Coordinate | p1 | 2nd coordinate |
SetMaximum(PointPairDistance)
Updates this
PointPairDistance
if ptDist
has greater Distance than this
instance.
Declaration
public void SetMaximum(PointPairDistance ptDist)
Parameters
Type | Name | Description |
---|---|---|
PointPairDistance | ptDist | The |
SetMaximum(Coordinate, Coordinate)
Updates this
PointPairDistance
if the distance between
p0
and p1
is greater than the
Distance of this
instance.
Declaration
public void SetMaximum(Coordinate p0, Coordinate p1)
Parameters
Type | Name | Description |
---|---|---|
Coordinate | p0 | The 1st point's coordinate |
Coordinate | p1 | The 2nd point's coordinate |
SetMinimum(PointPairDistance)
Updates this
PointPairDistance
if ptDist
has a smaller Distance than this
instance.
Declaration
public void SetMinimum(PointPairDistance ptDist)
Parameters
Type | Name | Description |
---|---|---|
PointPairDistance | ptDist | The |
SetMinimum(Coordinate, Coordinate)
Updates this
PointPairDistance
if the distance between
p0
and p1
is smaller than the
Distance of this
instance.
Declaration
public void SetMinimum(Coordinate p0, Coordinate p1)
Parameters
Type | Name | Description |
---|---|---|
Coordinate | p0 | The 1st point's coordinate |
Coordinate | p1 | The 2nd point's coordinate |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string |