Table of Contents

Class SegmentIntersectionDetector

Namespace
NetTopologySuite.Noding
Assembly
NetTopologySuite.dll

Detects and records an intersection between two ISegmentStrings, if one exists. Only a single intersection is recorded.

public class SegmentIntersectionDetector : ISegmentIntersector
Inheritance
SegmentIntersectionDetector
Implements
Inherited Members

Remarks

This strategy can be configured to search for proper intersections. In this case, the presence of any intersection will still be recorded, but searching will continue until either a proper intersection has been found or no intersections are detected.

Constructors

SegmentIntersectionDetector()

Creates an intersection finder using a RobustLineIntersector

public SegmentIntersectionDetector()

SegmentIntersectionDetector(LineIntersector)

Creates an intersection finder using a given LineIntersector

public SegmentIntersectionDetector(LineIntersector li)

Parameters

li LineIntersector

The LineIntersector to use

Properties

FindAllIntersectionTypes

Gets or sets whether processing can terminate once any intersection is found.

public bool FindAllIntersectionTypes { get; set; }

Property Value

bool

FindProper

Gets or sets whether processing must continue until a proper intersection is found

public bool FindProper { get; set; }

Property Value

bool

HasIntersection

Tests whether an intersection was found.

public bool HasIntersection { get; }

Property Value

bool

HasNonProperIntersection

Tests whether a non-proper intersection was found.

public bool HasNonProperIntersection { get; }

Property Value

bool

HasProperIntersection

Tests whether a proper intersection was found.

public bool HasProperIntersection { get; }

Property Value

bool

Intersection

Gets the computed location of the intersection. Due to round-off, the location may not be exact.

public Coordinate Intersection { get; }

Property Value

Coordinate

IntersectionSegments

Gets the endpoints of the intersecting segments.

public Coordinate[] IntersectionSegments { get; }

Property Value

Coordinate[]

Remarks

An array of the segment endpoints (p00, p01, p10, p11)

IsDone

Tests whether processing can terminate, because all required information has been obtained (e.g. an intersection of the desired type has been detected).

public bool IsDone { get; }

Property Value

bool

Methods

ProcessIntersections(ISegmentString, int, ISegmentString, int)

This method is called by clients of the ISegmentIntersector class to process intersections for two segments of the ISegmentStrings being intersected.

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

Parameters

e0 ISegmentString
segIndex0 int
e1 ISegmentString
segIndex1 int

Remarks

Note that some clients (such as MonotoneChains) may optimize away this call for segment pairs which they have determined do not intersect (e.g. by an disjoint envelope test).