Class GeometryValidator
- java.lang.Object
-
- edu.gsu.cs.dmlab.geometry.validation.GeometryValidator
-
public class GeometryValidator extends Object
-
-
Constructor Summary
Constructors Constructor Description GeometryValidator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static org.locationtech.jts.geom.Geometry
bufferValidate(org.locationtech.jts.geom.Geometry geom)
Validate given geometry using buffer(0.0) trickstatic org.locationtech.jts.geom.Geometry
polygonizerValidate(org.locationtech.jts.geom.Geometry geom)
Get / create a valid version of the geometry given.org.locationtech.jts.geom.Geometry
simplifierValidate(org.locationtech.jts.geom.Geometry geom)
Validate the given polygon-based geometry using D-P simplifier setEnsureValid is set to trueorg.locationtech.jts.geom.Geometry
validateGeometry(org.locationtech.jts.geom.Geometry geom)
Validates the given polygon-based geometry.
-
-
-
Method Detail
-
validateGeometry
public org.locationtech.jts.geom.Geometry validateGeometry(org.locationtech.jts.geom.Geometry geom)
Validates the given polygon-based geometry. Tries to simplify the geometry. Simplification is used for multipolygon elimination. This is much experimental, use it at your own risk.- Parameters:
geom
- -- polygon-based geometry- Returns:
-
bufferValidate
public static org.locationtech.jts.geom.Geometry bufferValidate(org.locationtech.jts.geom.Geometry geom)
Validate given geometry using buffer(0.0) trick- Parameters:
geom
-- Returns:
-
simplifierValidate
public org.locationtech.jts.geom.Geometry simplifierValidate(org.locationtech.jts.geom.Geometry geom)
Validate the given polygon-based geometry using D-P simplifier setEnsureValid is set to true- Parameters:
geom
-- Returns:
-
polygonizerValidate
public static org.locationtech.jts.geom.Geometry polygonizerValidate(org.locationtech.jts.geom.Geometry geom)
Get / create a valid version of the geometry given. If the geometry is a polygon or multi polygon, self intersections / inconsistencies are fixed. Otherwise the geometry is returned.- Parameters:
geom
-- Returns:
- a geometry
-
-