Class NodingIntersectionFinder
Finds non-noded intersections in a set of {@link SegmentString}s, if any exist.
Non-noded intersections include:
The finder can be limited to finding only interior intersections by setting InteriorIntersectionsOnly.
By default only the first intersection is found, but all can be found by setting FindAllIntersections.
Implements
Inherited Members
Namespace: NetTopologySuite.Noding
Assembly: NetTopologySuite.dll
Syntax
public class NodingIntersectionFinder : ISegmentIntersector
Constructors
| Improve this Doc View SourceNodingIntersectionFinder(LineIntersector)
Creates an intersection finder which finds an interior intersection if one exists
Declaration
public NodingIntersectionFinder(LineIntersector li)
Parameters
Type | Name | Description |
---|---|---|
LineIntersector | li | the LineIntersector to use |
Properties
| Improve this Doc View SourceCheckEndSegmentsOnly
Gets/Sets whether only end segments should be tested for intersection. This is a performance optimization that may be used if the segments have been previously noded by an appropriate algorithm. It may be known that any potential noding failures will occur only in end segments.
Declaration
public bool CheckEndSegmentsOnly { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Count
Gets the count of intersections found.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
Int32 | The intersection count. |
FindAllIntersections
Gets/Sets whether all intersections should be computed.
false
(the default value), the value of IsDone
is true
after the first intersection is found.
Default is false
.
Declaration
public bool FindAllIntersections { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
HasIntersection
Tests whether an intersection was found.
Declaration
public bool HasIntersection { get; }
Property Value
Type | Description |
---|---|
Boolean |
InteriorIntersection
Gets the computed location of the intersection. Due to round-off, the location may not be exact.
Declaration
[Obsolete("Renamed to just Intersection")]
public Coordinate InteriorIntersection { get; }
Property Value
Type | Description |
---|---|
Coordinate |
InteriorIntersectionsOnly
Gets or sets a value indicating whether only interior (proper) intersections will be found.
Declaration
public bool InteriorIntersectionsOnly { get; set; }
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 |
Intersections
Gets the intersections found.
Declaration
public ReadOnlyCollection<Coordinate> Intersections { get; }
Property Value
Type | Description |
---|---|
ReadOnlyCollection<Coordinate> | A list of Coordinate. |
IntersectionSegments
Gets the endpoints of the intersecting segments.
Declaration
public Coordinate[] IntersectionSegments { get; }
Property Value
Type | Description |
---|---|
Coordinate[] |
IsDone
Declaration
public bool IsDone { get; }
Property Value
Type | Description |
---|---|
Boolean |
KeepIntersections
Gets/Sets whether intersection points are recorded.
false
.
Default is true
.
Declaration
public bool KeepIntersections { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
| Improve this Doc View SourceCreateAllIntersectionsFinder(LineIntersector)
Creates a finder which tests if there is at least one intersection. The intersections are recorded for later inspection.
Declaration
public static NodingIntersectionFinder CreateAllIntersectionsFinder(LineIntersector li)
Parameters
Type | Name | Description |
---|---|---|
LineIntersector | li | A line intersector. |
Returns
Type | Description |
---|---|
NodingIntersectionFinder | A finder which finds all intersections. |
CreateAnyIntersectionFinder(LineIntersector)
Creates a finder which tests if there is at least one intersection. Uses short-circuiting for efficient performance. The intersection found is recorded.
Declaration
public static NodingIntersectionFinder CreateAnyIntersectionFinder(LineIntersector li)
Parameters
Type | Name | Description |
---|---|---|
LineIntersector | li | A line intersector. |
Returns
Type | Description |
---|---|
NodingIntersectionFinder | A finder which tests if there is at least one intersection. |
CreateInteriorIntersectionCounter(LineIntersector)
Creates a finder which counts all interior intersections. The intersections are note recorded to reduce memory usage.
Declaration
public static NodingIntersectionFinder CreateInteriorIntersectionCounter(LineIntersector li)
Parameters
Type | Name | Description |
---|---|---|
LineIntersector | li | A line intersector. |
Returns
Type | Description |
---|---|
NodingIntersectionFinder | A finder which counts all interior intersections. |
CreateInteriorIntersectionsFinder(LineIntersector)
Creates a finder which finds all interior intersections. The intersections are recorded for later inspection.
Declaration
public static NodingIntersectionFinder CreateInteriorIntersectionsFinder(LineIntersector li)
Parameters
Type | Name | Description |
---|---|---|
LineIntersector | li | A line intersector |
Returns
Type | Description |
---|---|
NodingIntersectionFinder | A finder which finds all interior intersections. |
CreateIntersectionCounter(LineIntersector)
Creates a finder which counts all intersections. The intersections are note recorded to reduce memory usage.
Declaration
public static NodingIntersectionFinder CreateIntersectionCounter(LineIntersector li)
Parameters
Type | Name | Description |
---|---|---|
LineIntersector | li | A line intersector. |
Returns
Type | Description |
---|---|
NodingIntersectionFinder | A finder which counts all intersections. |
ProcessIntersections(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.
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).
Declaration
public void ProcessIntersections(ISegmentString e0, int segIndex0, ISegmentString e1, int segIndex1)
Parameters
Type | Name | Description |
---|---|---|
ISegmentString | e0 | |
Int32 | segIndex0 | |
ISegmentString | e1 | |
Int32 | segIndex1 |