GEOS
3.9.1dev
|
Uses Snap Rounding to compute a rounded, fully noded arrangement from a set of SegmentString. More...
#include <MCIndexSnapRounder.h>
Public Member Functions | |
MCIndexSnapRounder (const geom::PrecisionModel &nPm) | |
std::vector< SegmentString * > * | getNodedSubstrings () const override |
Returns a collection of fully noded SegmentStrings. The SegmentStrings have the same context as their parent. More... | |
void | computeNodes (std::vector< SegmentString * > *segStrings) override |
Computes the noding for a collection of SegmentStrings. More... | |
void | computeVertexSnaps (std::vector< SegmentString * > &edges) |
Public Member Functions inherited from geos::noding::Noder | |
virtual | ~Noder () |
Private Member Functions | |
void | snapRound (MCIndexNoder &noder, std::vector< SegmentString * > *segStrings) |
void | findInteriorIntersections (MCIndexNoder &noder, std::vector< SegmentString * > *segStrings, std::vector< geom::Coordinate > &intersections) |
void | computeIntersectionSnaps (std::vector< geom::Coordinate > &snapPts) |
void | computeVertexSnaps (NodedSegmentString *e) |
void | checkCorrectness (std::vector< SegmentString * > &inputSegmentStrings) |
MCIndexSnapRounder (const MCIndexSnapRounder &other)=delete | |
MCIndexSnapRounder & | operator= (const MCIndexSnapRounder &rhs)=delete |
Private Attributes | |
const geom::PrecisionModel & | pm |
externally owned More... | |
algorithm::LineIntersector | li |
double | scaleFactor |
std::vector< SegmentString * > * | nodedSegStrings |
std::unique_ptr< MCIndexPointSnapper > | pointSnapper |
Additional Inherited Members | |
Protected Member Functions inherited from geos::noding::Noder | |
Noder () | |
Uses Snap Rounding to compute a rounded, fully noded arrangement from a set of SegmentString.
Implements the Snap Rounding technique described in Hobby, Guibas & Marimont, and Goodrich et al.
Snap Rounding assumes that all vertices lie on a uniform grid (hence the precision model of the input must be fixed precision, and all the input vertices must be rounded to that precision).
This implementation uses a monotone chains and a spatial index to speed up the intersection tests.
This implementation appears to be fully robust using an integer precision model.
It will function with non-integer precision models, but the results are not 100% guaranteed to be correctly noded.
Definition at line 74 of file MCIndexSnapRounder.h.
|
inline |
Definition at line 78 of file MCIndexSnapRounder.h.
|
privatedelete |
|
private |
|
private |
Computes nodes introduced as a result of snapping segments to snap points (hot pixels)
|
overridevirtual |
Computes the noding for a collection of SegmentStrings.
Some Noders may add all these nodes to the input SegmentStrings; others may only add some or none at all.
segStrings | a collection of SegmentStrings to node The caller remains responsible for releasing the memory associated with the container and its elements. |
Implements geos::noding::Noder.
void geos::noding::snapround::MCIndexSnapRounder::computeVertexSnaps | ( | std::vector< SegmentString * > & | edges | ) |
Computes nodes introduced as a result of snapping segments to vertices of other segments
edges | the list of segment strings to snap together NOTE: they must be instances of NodedSegmentString, or an assertion will fail. |
|
private |
Performs a brute-force comparison of every segment in each SegmentString. This has n^2 performance.
|
private |
Computes all interior intersections in the collection of SegmentStrings, and push their Coordinate to the provided vector.
Does NOT node the segStrings.
|
inlineoverridevirtual |
Returns a collection of fully noded SegmentStrings. The SegmentStrings have the same context as their parent.
Implements geos::noding::Noder.
Definition at line 88 of file MCIndexSnapRounder.h.
|
privatedelete |
|
private |
|
private |
Definition at line 110 of file MCIndexSnapRounder.h.
|
private |
Definition at line 114 of file MCIndexSnapRounder.h.
|
private |
externally owned
Definition at line 108 of file MCIndexSnapRounder.h.
|
private |
Definition at line 116 of file MCIndexSnapRounder.h.
|
private |
Definition at line 112 of file MCIndexSnapRounder.h.