GEOS  3.9.1dev
Public Member Functions | Private Attributes | List of all members
geos::operation::predicate::SegmentIntersectionTester Class Reference

Tests if any line segments in two sets of CoordinateSequences intersect. More...

#include <SegmentIntersectionTester.h>

Collaboration diagram for geos::operation::predicate::SegmentIntersectionTester:
[legend]

Public Member Functions

 SegmentIntersectionTester ()
 
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)
 

Private Attributes

algorithm::LineIntersector li
 For purposes of intersection testing, don't need to set precision model. More...
 
bool hasIntersectionVar
 

Detailed Description

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.

Definition at line 48 of file SegmentIntersectionTester.h.

Constructor & Destructor Documentation

geos::operation::predicate::SegmentIntersectionTester::SegmentIntersectionTester ( )
inline

Definition at line 62 of file SegmentIntersectionTester.h.

Member Function Documentation

bool geos::operation::predicate::SegmentIntersectionTester::hasIntersection ( const geom::LineString line,
const geom::LineString testLine 
)
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.

Parameters
line
testLine
Returns
bool geos::operation::predicate::SegmentIntersectionTester::hasIntersectionWithLineStrings ( const geom::LineString line,
const std::vector< const geom::LineString * > &  lines 
)

Member Data Documentation

bool geos::operation::predicate::SegmentIntersectionTester::hasIntersectionVar
private

Definition at line 58 of file SegmentIntersectionTester.h.

algorithm::LineIntersector geos::operation::predicate::SegmentIntersectionTester::li
private

For purposes of intersection testing, don't need to set precision model.

Definition at line 56 of file SegmentIntersectionTester.h.


The documentation for this class was generated from the following file: