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
| Edit this page View SourceSegmentIntersectionDetector()
Creates an intersection finder using a RobustLineIntersector
Declaration
public SegmentIntersectionDetector()
SegmentIntersectionDetector(ElevationModel)
Creates an intersection finder using a RobustLineIntersector with an ElevationModel
Declaration
public SegmentIntersectionDetector(ElevationModel em)
Parameters
| Type | Name | Description |
|---|---|---|
| ElevationModel | em | An elevation model. May be |
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
| Edit this page View SourceFindAllIntersectionTypes
Gets or sets whether processing can terminate once any intersection is found.
Declaration
public bool FindAllIntersectionTypes { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
FindProper
Gets or sets whether processing must continue until a proper intersection is found
Declaration
public bool FindProper { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
HasIntersection
Tests whether an intersection was found.
Declaration
public bool HasIntersection { get; }
Property Value
| Type | Description |
|---|---|
| bool |
HasNonProperIntersection
Tests whether a non-proper intersection was found.
Declaration
public bool HasNonProperIntersection { get; }
Property Value
| Type | Description |
|---|---|
| bool |
HasProperIntersection
Tests whether a proper intersection was found.
Declaration
public bool HasProperIntersection { get; }
Property Value
| Type | Description |
|---|---|
| bool |
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 |
|---|---|
| bool |
Methods
| Edit this page View SourceProcessIntersections(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.
Declaration
public void ProcessIntersections(ISegmentString e0, int segIndex0, ISegmentString e1, int segIndex1)
Parameters
| Type | Name | Description |
|---|---|---|
| ISegmentString | e0 | |
| int | segIndex0 | |
| ISegmentString | e1 | |
| int | segIndex1 |
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).