GEOS  3.13.0dev
Public Member Functions | List of all members
geos::noding::snapround::MCIndexSnapRounder Class Reference

Uses Snap Rounding to compute a rounded, fully noded arrangement from a set of SegmentString. More...

#include <MCIndexSnapRounder.h>

Inheritance diagram for geos::noding::snapround::MCIndexSnapRounder:
geos::noding::Noder

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)
 

Detailed Description

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.

Member Function Documentation

◆ computeNodes()

void geos::noding::snapround::MCIndexSnapRounder::computeNodes ( std::vector< SegmentString * > *  segStrings)
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.

Parameters
segStringsa collection of SegmentStrings to node The caller remains responsible for releasing the memory associated with the container and its elements.

Implements geos::noding::Noder.

◆ computeVertexSnaps()

void geos::noding::snapround::MCIndexSnapRounder::computeVertexSnaps ( std::vector< SegmentString * > &  edges)

Computes nodes introduced as a result of snapping segments to vertices of other segments

Parameters
edgesthe list of segment strings to snap together NOTE: they must be instances of NodedSegmentString, or an assertion will fail.

◆ getNodedSubstrings()

std::vector<SegmentString*>* geos::noding::snapround::MCIndexSnapRounder::getNodedSubstrings ( ) const
inlineoverridevirtual

Returns a collection of fully noded SegmentStrings. The SegmentStrings have the same context as their parent.

Returns
a newly allocated std::vector of newly allocated SegmentStrings (copies of input, if needs be). Caller is responsible to delete container and elements.

Implements geos::noding::Noder.


The documentation for this class was generated from the following file: