Table of Contents

Class SnapRoundingIntersectionAdder

Namespace
NetTopologySuite.Noding.Snapround
Assembly
NetTopologySuite.dll

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.
public sealed class SnapRoundingIntersectionAdder : ISegmentIntersector
Inheritance
SnapRoundingIntersectionAdder
Implements
Inherited Members

Constructors

SnapRoundingIntersectionAdder(PrecisionModel)

Creates an intersector which finds all snapped interior intersections, and adds them as nodes.

[Obsolete]
public SnapRoundingIntersectionAdder(PrecisionModel pm)

Parameters

pm PrecisionModel

The precision model to use

SnapRoundingIntersectionAdder(double)

Creates an intersector which finds all snapped interior intersections, and adds them as nodes.

public SnapRoundingIntersectionAdder(double nearnessTol)

Parameters

nearnessTol double

the intersection distance tolerance

Properties

Intersections

Gets the created intersection nodes, so they can be processed as hot pixels.

public Collection<Coordinate> Intersections { get; }

Property Value

Collection<Coordinate>

A list of intersection points

IsDone

Always process all intersections

public bool IsDone { get; }

Property Value

bool

Always false

Methods

ProcessIntersections(ISegmentString, int, ISegmentString, int)

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).

public void ProcessIntersections(ISegmentString e0, int segIndex0, ISegmentString e1, int segIndex1)

Parameters

e0 ISegmentString
segIndex0 int
e1 ISegmentString
segIndex1 int