Class SimpleMinimumClearance

java.lang.Object
org.locationtech.jts.precision.SimpleMinimumClearance

public class SimpleMinimumClearance extends Object
Computes the minimum clearance of a geometry or set of geometries.

The Minimum Clearance is a measure of what magnitude of perturbation of its vertices can be tolerated by a geometry before it becomes topologically invalid.

This class uses an inefficient O(N^2) scan. It is primarily for testing purposes.

See Also:
  • Field Details

    • inputGeom

      private Geometry inputGeom
    • minClearance

      private double minClearance
    • minClearancePts

      private Coordinate[] minClearancePts
  • Constructor Details

    • SimpleMinimumClearance

      public SimpleMinimumClearance(Geometry geom)
  • Method Details

    • getDistance

      public static double getDistance(Geometry g)
    • getLine

      public static Geometry getLine(Geometry g)
    • getDistance

      public double getDistance()
    • getLine

      public LineString getLine()
    • compute

      private void compute()
    • updateClearance

      private void updateClearance(double candidateValue, Coordinate p0, Coordinate p1)
    • updateClearance

      private void updateClearance(double candidateValue, Coordinate p, Coordinate seg0, Coordinate seg1)