Class SimplifyingGeometryValidator
- java.lang.Object
-
- edu.gsu.cs.dmlab.geometry.validation.SimplifyingGeometryValidator
-
- All Implemented Interfaces:
IGeometryValidator
public class SimplifyingGeometryValidator extends Object implements IGeometryValidator
A geometry validator that takes an input geometry and attempts to ensure that it is valid by performing a simplification action on the input geometry. This functionality was produced for the work described in Boubrahimi et. al, 2018.- Author:
- Original Soukaina Filali Boubrahimi, refactored by Dustin Kempton, Data Mining Lab, Georgia State University Michael Tinglof, Data Mining Lab, Georgia State University
-
-
Constructor Summary
Constructors Constructor Description SimplifyingGeometryValidator(IGeometryValidator polygonValidator, double simplifierDistance)
Constructor that takes in a geometry validator that removes self intersections / inconsistencies of passed in Geometry objects.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.locationtech.jts.geom.Geometry
produceValidGeometry(org.locationtech.jts.geom.Geometry input)
Performs some validation function on the input geometry and returns a new geometry that conforms to that validation method.
-
-
-
Constructor Detail
-
SimplifyingGeometryValidator
public SimplifyingGeometryValidator(IGeometryValidator polygonValidator, double simplifierDistance)
Constructor that takes in a geometry validator that removes self intersections / inconsistencies of passed in Geometry objects. It also takes in the variable for the simplifier distance tolerance is taken in.- Parameters:
polygonValidator
- The geometry validator that removes self intersections and the like.simplifierDistance
- The distance tolerance for the simplifier. All vertices in the simplified geometry will be within this distance of the original geometry. The tolerance value must be non-negative.
-
-
Method Detail
-
produceValidGeometry
public org.locationtech.jts.geom.Geometry produceValidGeometry(org.locationtech.jts.geom.Geometry input)
Description copied from interface:IGeometryValidator
Performs some validation function on the input geometry and returns a new geometry that conforms to that validation method. An example would be to ensure that the coordinate list is in a counterclockwise direction.- Specified by:
produceValidGeometry
in interfaceIGeometryValidator
- Parameters:
input
- The input geometry to force to conform to a set of validity rules.- Returns:
- A valid copy of the input geometry.
-
-