Class SegmentIntersectionDetector
Detects and records an intersection between two ISegmentStrings, if one exists. Only a single intersection is recorded.
Implements
Inherited Members
Namespace: NetTopologySuite.Noding
Assembly: NetTopologySuite.dll
Syntax
public class SegmentIntersectionDetector : ISegmentIntersector
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
| Improve this Doc View SourceSegmentIntersectionDetector()
Creates an intersection finder using a RobustLineIntersector
Declaration
public SegmentIntersectionDetector()
SegmentIntersectionDetector(LineIntersector)
Creates an intersection finder using a given LineIntersector
Declaration
public SegmentIntersectionDetector(LineIntersector li)
Parameters
Type | Name | Description |
---|---|---|
LineIntersector | li | The LineIntersector to use |
Properties
| Improve this Doc View SourceFindAllIntersectionTypes
Gets or sets whether processing can terminate once any intersection is found.
Declaration
public bool FindAllIntersectionTypes { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
FindProper
Gets or sets whether processing must continue until a proper intersection is found
Declaration
public bool FindProper { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
HasIntersection
Tests whether an intersection was found.
Declaration
public bool HasIntersection { get; }
Property Value
Type | Description |
---|---|
Boolean |
HasNonProperIntersection
Tests whether a non-proper intersection was found.
Declaration
public bool HasNonProperIntersection { get; }
Property Value
Type | Description |
---|---|
Boolean |
HasProperIntersection
Tests whether a proper intersection was found.
Declaration
public bool HasProperIntersection { get; }
Property Value
Type | Description |
---|---|
Boolean |
Intersection
Gets the computed location of the intersection. Due to round-off, the location may not be exact.
Declaration
public Coordinate Intersection { get; }
Property Value
Type | Description |
---|---|
Coordinate |
IntersectionSegments
Gets the endpoints of the intersecting segments.
Declaration
public Coordinate[] IntersectionSegments { get; }
Property Value
Type | Description |
---|---|
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).
Declaration
public bool IsDone { get; }
Property Value
Type | Description |
---|---|
Boolean |
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 ISegmentStrings being intersected.
Declaration
public void ProcessIntersections(ISegmentString e0, int segIndex0, ISegmentString e1, int segIndex1)
Parameters
Type | Name | Description |
---|---|---|
ISegmentString | e0 | |
Int32 | segIndex0 | |
ISegmentString | e1 | |
Int32 | segIndex1 |
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).