Class FastSegmentSetIntersectionFinder

java.lang.Object
org.locationtech.jts.noding.FastSegmentSetIntersectionFinder

public class FastSegmentSetIntersectionFinder extends Object
Finds if two sets of SegmentStrings intersect. Uses indexing for fast performance and to optimize repeated tests against a target set of lines. Short-circuited to return as soon an intersection is found. Immutable and thread-safe.
Version:
1.7
  • Constructor Details

    • FastSegmentSetIntersectionFinder

      public FastSegmentSetIntersectionFinder(Collection baseSegStrings)
      Creates an intersection finder against a given set of segment strings.
      Parameters:
      baseSegStrings - the segment strings to search for intersections
  • Method Details

    • getSegmentSetIntersector

      public SegmentSetMutualIntersector getSegmentSetIntersector()
      Gets the segment set intersector used by this class. This allows other uses of the same underlying indexed structure.
      Returns:
      the segment set intersector used
    • intersects

      public boolean intersects(Collection segStrings)
      Tests for intersections with a given set of target SegmentStrings.
      Parameters:
      segStrings - the SegmentStrings to test
      Returns:
      true if an intersection is found
    • intersects

      public boolean intersects(Collection segStrings, SegmentIntersectionDetector intDetector)
      Tests for intersections with a given set of target SegmentStrings. using a given SegmentIntersectionDetector.
      Parameters:
      segStrings - the SegmentStrings to test
      intDetector - the intersection detector to use
      Returns:
      true if the detector reports intersections