GEOS
3.9.1dev
|
#include <SnapRoundingIntersectionAdder.h>
Public Member Functions | |
SnapRoundingIntersectionAdder (const geom::PrecisionModel *newPm) | |
std::unique_ptr< std::vector< geom::Coordinate > > | getIntersections () |
void | processIntersections (SegmentString *e0, size_t segIndex0, SegmentString *e1, size_t segIndex1) override |
bool | isDone () const override |
![]() | |
virtual | ~SegmentIntersector () |
Private Member Functions | |
void | processNearVertex (const geom::Coordinate &p, SegmentString *edge, size_t segIndex, const geom::Coordinate &p0, const geom::Coordinate &p1) |
Private Attributes | |
algorithm::LineIntersector | li |
std::unique_ptr< std::vector< geom::Coordinate > > | intersections |
double | nearnessTol |
Static Private Attributes | |
static constexpr int | NEARNESS_FACTOR = 100 |
Additional Inherited Members | |
![]() | |
SegmentIntersector () | |
Finds intersections between line segments which will be snap-rounded, and adds them as nodes to the segments.
Intersections are detected and computed using full precision. Snapping takes place in a subsequent phase.
The intersection points are recorded, so that HotPixels can be created for them.
To avoid robustness issues with vertices which lie very close to line segments a heuristic is used: nodes are created if a vertex lies within a tolerance distance of the interior of a segment. The tolerance distance is chosen to be significantly below the snap-rounding grid size. This has empirically proven to eliminate noding failures.
Definition at line 65 of file SnapRoundingIntersectionAdder.h.
geos::noding::snapround::SnapRoundingIntersectionAdder::SnapRoundingIntersectionAdder | ( | const geom::PrecisionModel * | newPm | ) |
|
inline |
Definition at line 100 of file SnapRoundingIntersectionAdder.h.
|
inlineoverridevirtual |
Always process all intersections
Reimplemented from geos::noding::SegmentIntersector.
Definition at line 116 of file SnapRoundingIntersectionAdder.h.
|
overridevirtual |
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.
|
private |
If an endpoint of one segment is near the interior of the other segment, add it as an intersection. EXCEPT if the endpoint is also close to a segment endpoint (since this can introduce "zigs" in the linework).
This resolves situations where a segment A endpoint is extremely close to another segment B, but is not quite crossing. Due to robustness issues in orientation detection, this can result in the snapped segment A crossing segment B without a node being introduced.
|
private |
Definition at line 75 of file SnapRoundingIntersectionAdder.h.
|
private |
Definition at line 74 of file SnapRoundingIntersectionAdder.h.
|
staticprivate |
The division factor used to determine nearness distance tolerance for interior intersection detection.
Definition at line 72 of file SnapRoundingIntersectionAdder.h.
|
private |
Definition at line 77 of file SnapRoundingIntersectionAdder.h.