GEOS: geos::operation::predicate::SegmentIntersectionTester Class Reference

Public Member Functions

# geos::operation::predicate::SegmentIntersectionTester Class Reference

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

`#include <SegmentIntersectionTester.h>`

List of all members.

## 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)

## 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.

## Member Function Documentation

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:

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

- SegmentIntersectionTester.h