Class MinimumClearance
- Namespace
- NetTopologySuite.Precision
- Assembly
- NetTopologySuite.dll
Computes the Minimum Clearance of a Geometry.
The Minimum Clearance is a measure of what magnitude of perturbation of the vertices of a geometry can be tolerated before the geometry becomes topologically invalid. The smaller the Minimum Clearance distance, the less vertex perturbation the geometry can tolerate before becoming invalid.public class MinimumClearance
- Inheritance
-
MinimumClearance
- Inherited Members
Remarks
The concept was introduced by Thompson and Van Oosterom [TV06], based on earlier work by Milenkovic [Mi88].
The Minimum Clearance of a geometry G is defined to be the value r such that "the movement of all points by a distance of r in any direction will guarantee to leave the geometry valid" [TV06]. An equivalent constructive definition [Mi88] is that r is the largest value such:- No two distinct vertices of G are closer than r.
- No vertex of G is closer than r to an edge of G of which the vertex is not an endpoint

References
- [Mi88] Milenkovic, V. J., Verifiable implementations of geometric algorithms using finite precision arithmetic. in Artificial Intelligence, 377-401. 1988
- [TV06] Thompson, Rod and van Oosterom, Peter, Interchange of Spatial Data-Inhibiting Factors, Agile 2006, Visegrad, Hungary. 2006
Constructors
MinimumClearance(Geometry)
Creates an object to compute the Minimum Clearance for the given Geometry
public MinimumClearance(Geometry geom)
Parameters
geom
GeometryThe input geometry
Methods
GetDistance()
Gets the Minimum Clearance distance.
If no distance exists (e.g. in the case of two identical points) MaxValue is returned.
public double GetDistance()
Returns
- double
The value of the minimum clearance distance
or MaxValue if no Minimum Clearance distance exists
GetDistance(Geometry)
Computes the Minimum Clearance distance for the given Geometry.
public static double GetDistance(Geometry g)
Parameters
g
GeometryThe input geometry
Returns
- double
The minimum clearance
GetLine()
Gets a LineString containing two points which are at the Minimum Clearance distance.
If no distance could be found (e.g. in the case of two identical points)LINESTRING EMPTY
is returned.
public LineString GetLine()
Returns
- LineString
The value of the minimum clearance distance,
orLINESTRING EMPTY
if no minimum clearance distance exists.
GetLine(Geometry)
Gets a LineString containing two points which are at the Minimum Clearance distance for the given Geometry.
public static Geometry GetLine(Geometry g)
Parameters
g
GeometryThe input geometry
Returns
- Geometry
The value of the minimum clearance distance
orLINESTRING EMPTY
if no minimum clearance distance exists.