GEOS
3.14.0dev
|
#include <SnapRoundingIntersectionAdder.h>
Public Member Functions | |
SnapRoundingIntersectionAdder (double p_nearnessTol) | |
geom::CoordinateSequence | getIntersections () |
void | processIntersections (SegmentString *e0, std::size_t segIndex0, SegmentString *e1, std::size_t segIndex1) override |
bool | isDone () const override |
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.
|
inlineoverridevirtual |
Always process all intersections
Reimplemented from geos::noding::SegmentIntersector.
|
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.