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
LineIntersectorThe LineIntersector to use
Properties
FindAllIntersectionTypes
Gets or sets whether processing can terminate once any intersection is found.
public bool FindAllIntersectionTypes { get; set; }
Property Value
FindProper
Gets or sets whether processing must continue until a proper intersection is found
public bool FindProper { get; set; }
Property Value
HasIntersection
Tests whether an intersection was found.
public bool HasIntersection { get; }
Property Value
HasNonProperIntersection
Tests whether a non-proper intersection was found.
public bool HasNonProperIntersection { get; }
Property Value
HasProperIntersection
Tests whether a proper intersection was found.
public bool HasProperIntersection { get; }
Property Value
Intersection
Gets the computed location of the intersection. Due to round-off, the location may not be exact.
public Coordinate Intersection { get; }
Property Value
IntersectionSegments
Gets the endpoints of the intersecting segments.
public Coordinate[] IntersectionSegments { get; }
Property Value
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
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
ISegmentStringsegIndex0
inte1
ISegmentStringsegIndex1
int
Remarks
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).