Class SnapRoundingIntersectionAdder
Finds intersections between line segments which will be snap-rounded, and adds them as nodes to the segments.
Intersections are detected and computed using full precision. Snapping takes place in a subsequent phase.
The intersection points are recorded, so that HotPixels can be created for them.
To avoid robustness issues with vertices which lie very close to line segments a heuristic is used: nodes are created if a vertex lies within a tolerance distance of the interior of a segment. The tolerance distance is chosen to be significantly below the snap-rounding grid size. This has empirically proven to eliminate noding failures.
Implements
Inherited Members
Namespace: NetTopologySuite.Noding.Snapround
Assembly: NetTopologySuite.dll
Syntax
public sealed class SnapRoundingIntersectionAdder : ISegmentIntersector
Constructors
| Improve this Doc View SourceSnapRoundingIntersectionAdder(PrecisionModel)
Creates an intersector which finds all snapped interior intersections, and adds them as nodes.
Declaration
[Obsolete]
public SnapRoundingIntersectionAdder(PrecisionModel pm)
Parameters
Type | Name | Description |
---|---|---|
PrecisionModel | pm | The precision model to use |
SnapRoundingIntersectionAdder(Double)
Creates an intersector which finds all snapped interior intersections, and adds them as nodes.
Declaration
public SnapRoundingIntersectionAdder(double nearnessTol)
Parameters
Type | Name | Description |
---|---|---|
Double | nearnessTol | the intersection distance tolerance |
Properties
| Improve this Doc View SourceIntersections
Gets the created intersection nodes, so they can be processed as hot pixels.
Declaration
public Collection<Coordinate> Intersections { get; }
Property Value
Type | Description |
---|---|
Collection<Coordinate> | A list of intersection points |
IsDone
Always process all intersections
Declaration
public bool IsDone { get; }
Property Value
Type | Description |
---|---|
Boolean | Always |
Methods
| Improve this Doc View SourceProcessIntersections(ISegmentString, Int32, ISegmentString, Int32)
This method is called by clients
of the ISegmentIntersector class to process
intersections for two segments of the ISegmentString
s being intersected.
Note that some clients (such as MonotoneChain
s) may optimize away
this call for segment pairs which they have determined do not intersect
(e.g.by an disjoint envelope test).
Declaration
public void ProcessIntersections(ISegmentString e0, int segIndex0, ISegmentString e1, int segIndex1)
Parameters
Type | Name | Description |
---|---|---|
ISegmentString | e0 | |
Int32 | segIndex0 | |
ISegmentString | e1 | |
Int32 | segIndex1 |