GEOS 3.14.0dev
|
Tests if any line segments in two sets of CoordinateSequences intersect. More...
#include <SegmentIntersectionTester.h>
Public Member Functions | |
bool | hasIntersectionWithLineStrings (const geom::LineString &line, const std::vector< const geom::LineString * > &lines) |
bool | hasIntersection (const geom::LineString &line, const geom::LineString &testLine) |
bool | hasIntersectionWithEnvelopeFilter (const geom::LineString &line, const geom::LineString &testLine) |
Tests if any line segments in two sets of CoordinateSequences intersect.
The algorithm is optimized for use when the first input has smaller extent than the set of test lines. The code is short-circuited to return as soon an intersection is found.
bool geos::operation::predicate::SegmentIntersectionTester::hasIntersectionWithEnvelopeFilter | ( | const geom::LineString & | line, |
const geom::LineString & | testLine | ||
) |
Tests the segments of a LineString against the segs in another LineString for intersection. Uses the envelope of the query LineString to filter before testing segments directly. This is optimized for the case when the query LineString is a rectangle.
Testing shows this is somewhat faster than not checking the envelope.
line | |
testLine |