Table of Contents

Method DistanceTo

Namespace
GeometryHelper.Spatial
Assembly
GeometryHelper.dll

DistanceTo(GeoPoint2)

Gets the distance from a point to the nearest indexed edge.

public double DistanceTo(GeoPoint2 point)

Parameters

point GeoPoint2

Returns

double

Exceptions

InvalidOperationException

Thrown when nothing was indexed.

DistanceTo(GeoPoint2, Tolerance)

Gets the distance from a point to the nearest indexed edge, within a tolerance.

public double DistanceTo(GeoPoint2 point, Tolerance tolerance)

Parameters

point GeoPoint2
tolerance Tolerance

Returns

double

Remarks

This is the distance to the edges, not to the region they may enclose: a point well inside a closed shape is measured out to its boundary rather than called nought, which is what DistanceTo(GeoPoint2) would say of it. An index holds edges and knows nothing of what they enclose.

Exceptions

InvalidOperationException

Thrown when nothing was indexed.

DistanceTo(GeoBvh2)

Gets the distance between two hierarchies, measured between the edges they hold.

public double DistanceTo(GeoBvh2 other)

Parameters

other GeoBvh2

Returns

double

Exceptions

ArgumentNullException

Thrown when the other hierarchy is null.

DistanceTo(GeoBvh2, Tolerance)

Gets the distance between two hierarchies, within a tolerance.

public double DistanceTo(GeoBvh2 other, Tolerance tolerance)

Parameters

other GeoBvh2
tolerance Tolerance

Returns

double

Exceptions

ArgumentNullException

Thrown when the other hierarchy is null.