Finds non-noded intersections in a set of SegmentStrings, if any exist.
More...
#include <NodingIntersectionFinder.h>
|
| NodingIntersectionFinder (const NodingIntersectionFinder &other)=delete |
|
NodingIntersectionFinder & | operator= (const NodingIntersectionFinder &rhs)=delete |
|
bool | isInteriorVertexIntersection (const geom::Coordinate &p0, const geom::Coordinate &p1, bool isEnd0, bool isEnd1) |
| Tests if two vertices with at least one in a segmentString interior are equal. More...
|
|
bool | isInteriorVertexIntersection (const geom::Coordinate &p00, const geom::Coordinate &p01, const geom::Coordinate &p10, const geom::Coordinate &p11, bool isEnd00, bool isEnd01, bool isEnd10, bool isEnd11) |
| Tests if an intersection occurs between a SegmentString interior vertex and another vertex. More...
|
|
bool | isEndSegment (const SegmentString *segStr, size_t index) |
| Tests whether a segment in a SegmentString is an end segment. (either the first or last). More...
|
|
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
Definition at line 47 of file NodingIntersectionFinder.h.
Creates an intersection finder which finds an interior intersection if one exists.
- Parameters
-
newLi | the LineIntersector to use |
Definition at line 57 of file NodingIntersectionFinder.h.
size_t geos::noding::NodingIntersectionFinder::count |
( |
| ) |
const |
|
inline |
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
Definition at line 85 of file NodingIntersectionFinder.h.
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)
Definition at line 140 of file NodingIntersectionFinder.h.
bool geos::noding::NodingIntersectionFinder::hasIntersection |
( |
| ) |
const |
|
inline |
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.
Definition at line 159 of file NodingIntersectionFinder.h.
bool geos::noding::NodingIntersectionFinder::isEndSegment |
( |
const SegmentString * |
segStr, |
|
|
size_t |
index |
|
) |
| |
|
private |
Tests whether a segment in a SegmentString is an end segment. (either the first or last).
- Parameters
-
segStr | a segment string |
index | the index of a segment in the segment string |
- Returns
- true if the segment is an end segment
bool geos::noding::NodingIntersectionFinder::isInteriorVertexIntersection |
( |
const geom::Coordinate & |
p0, |
|
|
const geom::Coordinate & |
p1, |
|
|
bool |
isEnd0, |
|
|
bool |
isEnd1 |
|
) |
| |
|
private |
Tests if two vertices with at least one in a segmentString interior are equal.
- Parameters
-
p0 | a segment vertex |
p1 | a segment vertex |
isEnd0 | true if vertex is a segmentString endpoint |
isEnd1 | true if vertex is a segmentString endpoint |
- Returns
- true if an intersection is found
Tests if an intersection occurs between a SegmentString interior vertex and another vertex.
- Note
- intersections between two endpoint vertices are valid noding, and are not flagged.
- Parameters
-
p00 | a segment vertex |
p01 | a segment vertex |
p10 | a segment vertex |
p11 | a segment vertex |
isEnd00 | true if vertex is a segmentString endpoint |
isEnd01 | true if vertex is a segmentString endpoint |
isEnd10 | true if vertex is a segmentString endpoint |
isEnd11 | true if vertex is a segmentString endpoint |
- Returns
- true if an intersection is found
void geos::noding::NodingIntersectionFinder::processIntersections |
( |
SegmentString * |
e0, |
|
|
size_t |
segIndex0, |
|
|
SegmentString * |
e1, |
|
|
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.
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 |
Definition at line 112 of file NodingIntersectionFinder.h.
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 |
Definition at line 129 of file NodingIntersectionFinder.h.
bool geos::noding::NodingIntersectionFinder::findAllIntersections |
|
private |
size_t geos::noding::NodingIntersectionFinder::intersectionCount |
|
private |
std::vector<geom::Coordinate> geos::noding::NodingIntersectionFinder::intSegments |
|
private |
bool geos::noding::NodingIntersectionFinder::isCheckEndSegmentsOnly |
|
private |
The documentation for this class was generated from the following file: