Class DistanceToPoint
Computes the Euclidean distance (L2 metric) from a Coordinate to a Geometry.
Inherited Members
Namespace: NetTopologySuite.Algorithm.Distance
Assembly: NetTopologySuite.dll
Syntax
public static class DistanceToPoint
Remarks
Also computes two points on the geometry which are separated by the distance found.
Methods
| Edit this page View SourceComputeDistance(Geometry, Coordinate, PointPairDistance)
Computes the Euclidean distance (L2 metric) from a Coordinate to a Geometry.
Declaration
public static void ComputeDistance(Geometry geom, Coordinate pt, PointPairDistance ptDist)
Parameters
Type | Name | Description |
---|---|---|
Geometry | geom | The geometry |
Coordinate | pt | The Point |
PointPairDistance | ptDist | The |
ComputeDistance(LineSegment, Coordinate, PointPairDistance)
Computes the Euclidean distance (L2 metric) from a Coordinate to a LineSegment.
Declaration
public static void ComputeDistance(LineSegment segment, Coordinate pt, PointPairDistance ptDist)
Parameters
Type | Name | Description |
---|---|---|
LineSegment | segment | The |
Coordinate | pt | The Point |
PointPairDistance | ptDist | The |
ComputeDistance(LineString, Coordinate, PointPairDistance)
Computes the Euclidean distance (L2 metric) from a Coordinate to a LineString.
Declaration
public static void ComputeDistance(LineString line, Coordinate pt, PointPairDistance ptDist)
Parameters
Type | Name | Description |
---|---|---|
LineString | line | The |
Coordinate | pt | The Point |
PointPairDistance | ptDist | The |
ComputeDistance(Polygon, Coordinate, PointPairDistance)
Computes the Euclidean distance (L2 metric) from a Coordinate to a Polygon.
Declaration
public static void ComputeDistance(Polygon poly, Coordinate pt, PointPairDistance ptDist)
Parameters
Type | Name | Description |
---|---|---|
Polygon | poly | The |
Coordinate | pt | The Point |
PointPairDistance | ptDist | The |