Table of Contents

Class FastSegmentSetIntersectionFinder

Namespace
NetTopologySuite.Noding
Assembly
NetTopologySuite.dll

Finds if two sets of ISegmentStrings intersect.

public class FastSegmentSetIntersectionFinder
Inheritance
FastSegmentSetIntersectionFinder
Inherited Members

Remarks

Uses indexing for fast performance and to optimize repeated tests against a target set of lines. Short-circuited to return as soon an intersection is found.

Immutable and thread-safe.

Constructors

FastSegmentSetIntersectionFinder(IEnumerable<ISegmentString>)

Creates an intersection finder against a given set of segment strings.

public FastSegmentSetIntersectionFinder(IEnumerable<ISegmentString> baseSegStrings)

Parameters

baseSegStrings IEnumerable<ISegmentString>

The segment strings to search for intersections

Properties

SegmentSetIntersector

Gets the segment set intersector used by this class.

public ISegmentSetMutualIntersector SegmentSetIntersector { get; }

Property Value

ISegmentSetMutualIntersector

Remarks

This allows other uses of the same underlying indexed structure.

Methods

Intersects(IList<ISegmentString>)

Tests for intersections with a given set of target ISegmentStrings.

public bool Intersects(IList<ISegmentString> segStrings)

Parameters

segStrings IList<ISegmentString>

The SegmentStrings to test

Returns

bool

true if an intersection was found

Intersects(IList<ISegmentString>, SegmentIntersectionDetector)

Tests for intersections with a given set of target ISegmentStrings. using a given SegmentIntersectionDetector.

public bool Intersects(IList<ISegmentString> segStrings, SegmentIntersectionDetector intDetector)

Parameters

segStrings IList<ISegmentString>

The SegmentStrings to test

intDetector SegmentIntersectionDetector

The intersection detector to use

Returns

bool

true if the detector reports intersections