Detects and records an intersection between two SegmentStrings, if one exists. More...
#include <SegmentIntersectionDetector.h>
Public Member Functions | |
SegmentIntersectionDetector (LineIntersector *li) | |
void | setFindProper (bool findProper) |
void | setFindAllIntersectionTypes (bool findAllTypes) |
bool | hasIntersection () const |
bool | hasProperIntersection () const |
bool | hasNonProperIntersection () const |
const geom::Coordinate *const | getIntersection () const |
const geom::CoordinateSequence * | getIntersectionSegments () const |
bool | isDone () const |
Reports whether the client of this class needs to continue testing all intersections in an arrangement. | |
void | processIntersections (noding::SegmentString *e0, int segIndex0, noding::SegmentString *e1, int segIndex1) |
Detects and records an intersection between two SegmentStrings, if one exists.
This strategy can be configured to search for proper intersections. In this case, the presence of any intersection will still be recorded, but searching will continue until either a proper intersection has been found or no intersections are detected.
Only a single intersection is recorded.
const geom::Coordinate* const geos::noding::SegmentIntersectionDetector::getIntersection | ( | ) | const [inline] |
Gets the computed location of the intersection. Due to round-off, the location may not be exact.
const geom::CoordinateSequence* geos::noding::SegmentIntersectionDetector::getIntersectionSegments | ( | ) | const [inline] |
Gets the endpoints of the intersecting segments.
bool geos::noding::SegmentIntersectionDetector::hasIntersection | ( | ) | const [inline] |
Tests whether an intersection was found.
bool geos::noding::SegmentIntersectionDetector::hasNonProperIntersection | ( | ) | const [inline] |
Tests whether a non-proper intersection was found.
bool geos::noding::SegmentIntersectionDetector::hasProperIntersection | ( | ) | const [inline] |
Tests whether a proper intersection was found.
bool geos::noding::SegmentIntersectionDetector::isDone | ( | ) | const [inline, virtual] |
Reports whether the client of this class needs to continue testing all intersections in an arrangement.
The default implementation always return false (process all intersections).
Reimplemented from geos::noding::SegmentIntersector.
void geos::noding::SegmentIntersectionDetector::processIntersections | ( | noding::SegmentString * | e0, | |
int | segIndex0, | |||
noding::SegmentString * | e1, | |||
int | segIndex1 | |||
) | [virtual] |
This method is called by clients of the SegmentIntersector class to process intersections for two segments of the SegmentStrings being intersected. Note that some clients (such as MonotoneChains) may optimize away this call for segment pairs which they have determined do not intersect (e.g. by an disjoint envelope test).
Implements geos::noding::SegmentIntersector.