Package org.locationtech.jts.noding
Class FastSegmentSetIntersectionFinder
java.lang.Object
org.locationtech.jts.noding.FastSegmentSetIntersectionFinder
Finds if two sets of
SegmentString
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
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFastSegmentSetIntersectionFinder
(Collection baseSegStrings) Creates an intersection finder against a given set of segment strings. -
Method Summary
Modifier and TypeMethodDescriptionGets the segment set intersector used by this class.boolean
intersects
(Collection segStrings) Tests for intersections with a given set of targetSegmentString
s.boolean
intersects
(Collection segStrings, SegmentIntersectionDetector intDetector) Tests for intersections with a given set of targetSegmentString
s.
-
Field Details
-
segSetMutInt
-
-
Constructor Details
-
FastSegmentSetIntersectionFinder
Creates an intersection finder against a given set of segment strings.- Parameters:
baseSegStrings
- the segment strings to search for intersections
-
-
Method Details
-
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
Tests for intersections with a given set of targetSegmentString
s.- Parameters:
segStrings
- the SegmentStrings to test- Returns:
- true if an intersection is found
-
intersects
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
-