Finds non-noded intersections in a set of SegmentStrings, if any exist.
More...
#include <NodingIntersectionFinder.h>
Finds non-noded intersections in a set of SegmentStrings, if any exist.
Non-noded intersections include:
- intersections which lie in the interior of a segment
- intersections at a vertex in the interior of a SegmentString (e.g. with a segment string endpoint or other interior vertex)
- Version
- 1.7
◆ NodingIntersectionFinder()
Creates an intersection finder which finds an interior intersection if one exists.
- Parameters
-
newLi | the LineIntersector to use |
◆ count()
size_t geos::noding::NodingIntersectionFinder::count |
( |
| ) |
const |
|
inline |
Gets the count of intersections found.
- Returns
- the intersection count
◆ getInteriorIntersection()
const geom::Coordinate& geos::noding::NodingIntersectionFinder::getInteriorIntersection |
( |
| ) |
const |
|
inline |
Gets the computed location of the intersection. Due to round-off, the location may not be exact.
- Returns
- the coordinate for the intersection location
◆ getIntersectionSegments()
const std::vector<geom::Coordinate>& geos::noding::NodingIntersectionFinder::getIntersectionSegments |
( |
| ) |
const |
|
inline |
Gets the endpoints of the intersecting segments.
- Returns
- an array of the segment endpoints (p00, p01, p10, p11)
◆ hasIntersection()
bool geos::noding::NodingIntersectionFinder::hasIntersection |
( |
| ) |
const |
|
inline |
Tests whether an intersection was found.
- Returns
- true if an intersection was found
◆ isDone()
bool geos::noding::NodingIntersectionFinder::isDone |
( |
| ) |
const |
|
inlineoverridevirtual |
Reports whether the client of this class needs to continue testing all intersections in an arrangement.
- Returns
- true if there is not need to continue testing segments
The default implementation always return false (process all intersections).
Reimplemented from geos::noding::SegmentIntersector.
◆ processIntersections()
void geos::noding::NodingIntersectionFinder::processIntersections |
( |
SegmentString * |
e0, |
|
|
std::size_t |
segIndex0, |
|
|
SegmentString * |
e1, |
|
|
std::size_t |
segIndex1 |
|
) |
| |
|
overridevirtual |
This method is called by clients of the SegmentIntersector class to process intersections for two segments of the SegmentStrings being intersected.
- Note
- 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.
◆ setCheckEndSegmentsOnly()
void geos::noding::NodingIntersectionFinder::setCheckEndSegmentsOnly |
( |
bool |
isCESO | ) |
|
|
inline |
Sets whether only end segments should be tested for interior intersection.
This is a performance optimization that may be used if the segments have been previously noded by an appropriate algorithm. It may be known that any potential noding failures will occur only in end segments.
- Parameters
-
isCESO | whether to test only end segments |
◆ setFindAllIntersections()
void geos::noding::NodingIntersectionFinder::setFindAllIntersections |
( |
bool |
fAI | ) |
|
|
inline |
Sets whether all intersections should be computed.
When this is false
(the default value) the value of isDone() is true
after the first intersection is found.
Default is false
.
- Parameters
-
fAI | whether all intersections should be computed |
The documentation for this class was generated from the following file: