Class GeometryValidator


  • public class GeometryValidator
    extends Object
    • Constructor Detail

      • GeometryValidator

        public GeometryValidator()
    • 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