Class SimpleSnapRounder
- Namespace
- NetTopologySuite.Noding.Snapround
- Assembly
- NetTopologySuite.dll
Uses Snap Rounding to compute a rounded, fully noded arrangement from a set of ISegmentStrings.
Implements the Snap Rounding technique described in the papers by Hobby, Guibas & Marimont, and Goodrich et al. Snap Rounding enforces that all vertices lie on a uniform grid, which is determined by the provided PrecisionModel. Input vertices do not have to be rounded to this grid; this will be done during the snap-rounding process. This implementation uses simple iteration over the line segments. This is not an efficient approach for large sets of segments. 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.[Obsolete("Use SnapRoundingNoder instead")]
public class SimpleSnapRounder : INoder
- Inheritance
-
SimpleSnapRounder
- Implements
- Inherited Members
Constructors
SimpleSnapRounder(PrecisionModel)
Initializes a new instance of the SimpleSnapRounder class.
public SimpleSnapRounder(PrecisionModel pm)
Parameters
pm
PrecisionModelThe PrecisionModel to use.
Methods
ComputeNodes(IList<ISegmentString>)
Computes the noding for a collection of ISegmentStrings. Some Noders may add all these nodes to the input ISegmentStrings; others may only add some or none at all.
public void ComputeNodes(IList<ISegmentString> inputSegmentStrings)
Parameters
inputSegmentStrings
IList<ISegmentString>A collection of NodedSegmentStrings
ComputeVertexSnaps(IList<ISegmentString>)
Computes nodes introduced as a result of snapping segments to vertices of other segments.
[Obsolete("This method is no longer supported in the latest version of NetTopologySuite and may cause unexpected behavior. Strongly favor using MCIndexPointSnapper instead.")]
public void ComputeVertexSnaps(IList<ISegmentString> edges)
Parameters
edges
IList<ISegmentString>The list of segment strings to snap together
GetNodedSubstrings()
Returns a IList of fully noded ISegmentStrings. The ISegmentStrings have the same context as their parent.
public IList<ISegmentString> GetNodedSubstrings()
Returns
- IList<ISegmentString>
A Collection of NodedSegmentStrings representing the substrings