Class SnappingIntersectionAdder

  • All Implemented Interfaces:
    SegmentIntersector

    public class SnappingIntersectionAdder
    extends java.lang.Object
    implements SegmentIntersector
    Finds intersections between line segments which are being snapped, and adds them as nodes.
    Version:
    1.17
    • Constructor Detail

      • SnappingIntersectionAdder

        public SnappingIntersectionAdder​(double snapTolerance,
                                         SnappingPointIndex snapPointIndex)
        Creates an intersector which finds intersections, snaps them, and adds them as nodes.
        Parameters:
        snapTolerance - the snapping tolerance distance
        snapPointIndex - the snapPointIndex
    • Method Detail

      • processIntersections

        public void processIntersections​(SegmentString seg0,
                                         int segIndex0,
                                         SegmentString seg1,
                                         int segIndex1)
        This method is called by clients of the SegmentIntersector class to process intersections for two segments of the SegmentStrings being intersected. Note that some clients (such as MonotoneChains) may optimize away this call for segment pairs which they have determined do not intersect (e.g. by an disjoint envelope test).
        Specified by:
        processIntersections in interface SegmentIntersector
      • isDone

        public boolean isDone()
        Always process all intersections
        Specified by:
        isDone in interface SegmentIntersector
        Returns:
        false always