Package org.locationtech.jts.noding
Class FastSegmentSetIntersectionFinder
- java.lang.Object
-
- org.locationtech.jts.noding.FastSegmentSetIntersectionFinder
-
public class FastSegmentSetIntersectionFinder extends java.lang.Object
Finds if two sets ofSegmentString
s 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 Summary
Constructors Constructor Description FastSegmentSetIntersectionFinder(java.util.Collection baseSegStrings)
Creates an intersection finder against a given set of segment strings.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SegmentSetMutualIntersector
getSegmentSetIntersector()
Gets the segment set intersector used by this class.boolean
intersects(java.util.Collection segStrings)
Tests for intersections with a given set of targetSegmentString
s.boolean
intersects(java.util.Collection segStrings, SegmentIntersectionDetector intDetector)
Tests for intersections with a given set of targetSegmentString
s.
-
-
-
Method Detail
-
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(java.util.Collection segStrings)
Tests for intersections with a given set of targetSegmentString
s.- Parameters:
segStrings
- the SegmentStrings to test- Returns:
- true if an intersection is found
-
intersects
public boolean intersects(java.util.Collection segStrings, SegmentIntersectionDetector intDetector)
Tests for intersections with a given set of targetSegmentString
s. using a given SegmentIntersectionDetector.- Parameters:
segStrings
- the SegmentStrings to testintDetector
- the intersection detector to use- Returns:
- true if the detector reports intersections
-
-