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

#include <SnapRoundingNoder.h>

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

Public Member Functions

 SnapRoundingNoder (const geom::PrecisionModel *p_pm)
 
std::vector< SegmentString * > * getNodedSubstrings () const override
 
void computeNodes (std::vector< SegmentString * > *inputSegStrings) override
 

Detailed Description

Uses Snap Rounding to compute a rounded, fully noded arrangement from a set of noding::SegmentStrings, in a performant way, and avoiding unnecessary noding.

Implements the Snap Rounding technique described in the papers by Hobby, Guibas & Marimont, and Goodrich et al. Snap Rounding enforces that all output vertices lie on a uniform grid, which is determined by the provided geom::PrecisionModel.

Input vertices do not have to be rounded to the grid beforehand; this is done during the snap-rounding process. In fact, rounding cannot be done a priori, since rounding vertices by themselves can distort the rounded topology of the arrangement (i.e. by moving segments away from hot pixels that would otherwise intersect them, or by moving vertices across segments).

To minimize the number of introduced nodes, the Snap-Rounding Noder avoids creating nodes at edge vertices if there is no intersection or snap at that location. However, if two different input edges contain identical segments, each of the segment vertices will be noded. This still provides fully-noded output. This is the same behaviour provided by other noders, such as noding::MCIndexNoder and noding::snap::SnappingNoder.

Member Function Documentation

◆ computeNodes()

void geos::noding::snapround::SnapRoundingNoder::computeNodes ( std::vector< SegmentString * > *  inputSegStrings)
overridevirtual

Computes the nodes in the snap-rounding line arrangement. The nodes are added to the NodedSegmentStrings provided as the input.

Implements geos::noding::Noder.

◆ getNodedSubstrings()

std::vector<SegmentString*>* geos::noding::snapround::SnapRoundingNoder::getNodedSubstrings ( ) const
overridevirtual
Returns
a Collection of NodedSegmentStrings representing the substrings

Implements geos::noding::Noder.


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