Class SimpleSnapRounder
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.
Implements
Inherited Members
Namespace: NetTopologySuite.Noding.Snapround
Assembly: NetTopologySuite.dll
Syntax
[Obsolete("Use SnapRoundingNoder instead")]
public class SimpleSnapRounder : INoder
Constructors
| Improve this Doc View SourceSimpleSnapRounder(PrecisionModel)
Initializes a new instance of the SimpleSnapRounder class.
Declaration
public SimpleSnapRounder(PrecisionModel pm)
Parameters
Type | Name | Description |
---|---|---|
PrecisionModel | pm | The PrecisionModel to use. |
Methods
| Improve this Doc View SourceComputeNodes(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.
Declaration
public void ComputeNodes(IList<ISegmentString> inputSegmentStrings)
Parameters
Type | Name | Description |
---|---|---|
IList<ISegmentString> | inputSegmentStrings | A collection of NodedSegmentStrings |
ComputeVertexSnaps(IList<ISegmentString>)
Computes nodes introduced as a result of snapping segments to vertices of other segments.
Declaration
[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
Type | Name | Description |
---|---|---|
IList<ISegmentString> | edges | 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.
Declaration
public IList<ISegmentString> GetNodedSubstrings()
Returns
Type | Description |
---|---|
IList<ISegmentString> | A Collection of NodedSegmentStrings representing the substrings |