Class SelfIntersectionUtil



  • public class SelfIntersectionUtil
    extends Object
    This class provides methods for checking the integrity of LinearRings and for solving integrity problems. Currently only self-intersections are considered and may be repaired.
    • Constructor Detail

      • SelfIntersectionUtil

        public SelfIntersectionUtil()
    • Method Detail

      • hasSelfIntersections

        public static boolean hasSelfIntersections(LineString string)
        Perform a test, whether the given string is sane. A check for self-intersections will be performed. This method is for testing only and does not return any value. Instead it will print on standard output.
        Parameters:
        string - the lineString to check.
        Returns:
      • repair

        public static Set<LinearRing> repair(LinearRing input)
        Given a LinearRing, possibly containing errors (self-intersections), repair this ring by splitting it up into several rings.
        Parameters:
        input - the ring to repair.
        Returns:
        a set of possibly more than one repaired rings.