Class InvalidHoleRemover


  • public class InvalidHoleRemover
    extends java.lang.Object
    Removes holes which are invalid due to not being wholly covered by the parent shell.

    Notes:

    • Does not remove holes which are invalid due to touching other rings at more than one point
    • Does not remove holes which are nested inside another hole
    Author:
    Martin Davis
    • Constructor Summary

      Constructors 
      Constructor Description
      InvalidHoleRemover​(org.locationtech.jts.geom.Geometry geom)
      Creates a new invalid hole remover instance.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static org.locationtech.jts.geom.Geometry clean​(org.locationtech.jts.geom.Geometry geom)
      Removes invalid holes from the polygons in a geometry.
      org.locationtech.jts.geom.Geometry getResult()
      Gets the cleaned geometry.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • InvalidHoleRemover

        public InvalidHoleRemover​(org.locationtech.jts.geom.Geometry geom)
        Creates a new invalid hole remover instance.
        Parameters:
        geom - the geometry to process
    • Method Detail

      • clean

        public static org.locationtech.jts.geom.Geometry clean​(org.locationtech.jts.geom.Geometry geom)
        Removes invalid holes from the polygons in a geometry.
        Parameters:
        geom - the geometry to clean
        Returns:
        the geometry with invalid holes removed
      • getResult

        public org.locationtech.jts.geom.Geometry getResult()
        Gets the cleaned geometry.
        Returns:
        the geometry with invalid holes removed.