Class NodingIntersectionFinder
- Namespace
- NetTopologySuite.Noding
- Assembly
- NetTopologySuite.dll
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.public class NodingIntersectionFinder : ISegmentIntersector
- Inheritance
-
NodingIntersectionFinder
- Implements
- Inherited Members
Constructors
NodingIntersectionFinder(LineIntersector)
Creates an intersection finder which finds an interior intersection if one exists
public NodingIntersectionFinder(LineIntersector li)
Parameters
li
LineIntersectorthe LineIntersector to use
Properties
CheckEndSegmentsOnly
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.
public bool CheckEndSegmentsOnly { get; set; }
Property Value
Count
Gets the count of intersections found.
public int Count { get; }
Property Value
- int
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
.
public bool FindAllIntersections { get; set; }
Property Value
HasIntersection
Tests whether an intersection was found.
public bool HasIntersection { get; }
Property Value
InteriorIntersection
Gets the computed location of the intersection. Due to round-off, the location may not be exact.
[Obsolete("Renamed to just Intersection")]
public Coordinate InteriorIntersection { get; }
Property Value
InteriorIntersectionsOnly
Gets or sets a value indicating whether only interior (proper) intersections will be found.
public bool InteriorIntersectionsOnly { get; set; }
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
Intersections
Gets the intersections found.
public ReadOnlyCollection<Coordinate> Intersections { get; }
Property Value
- ReadOnlyCollection<Coordinate>
A list of Coordinate.
IsDone
public bool IsDone { get; }
Property Value
KeepIntersections
Gets/Sets whether intersection points are recorded.
false
.
Default is true
.
public bool KeepIntersections { get; set; }
Property Value
Methods
CreateAllIntersectionsFinder(LineIntersector)
Creates a finder which tests if there is at least one intersection. The intersections are recorded for later inspection.
public static NodingIntersectionFinder CreateAllIntersectionsFinder(LineIntersector li)
Parameters
li
LineIntersectorA line intersector.
Returns
- 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.
public static NodingIntersectionFinder CreateAnyIntersectionFinder(LineIntersector li)
Parameters
li
LineIntersectorA line intersector.
Returns
- 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.
public static NodingIntersectionFinder CreateInteriorIntersectionCounter(LineIntersector li)
Parameters
li
LineIntersectorA line intersector.
Returns
- 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.
public static NodingIntersectionFinder CreateInteriorIntersectionsFinder(LineIntersector li)
Parameters
li
LineIntersectorA line intersector
Returns
- 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.
public static NodingIntersectionFinder CreateIntersectionCounter(LineIntersector li)
Parameters
li
LineIntersectorA line intersector.
Returns
- NodingIntersectionFinder
A finder which counts all intersections.
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.
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).
public void ProcessIntersections(ISegmentString e0, int segIndex0, ISegmentString e1, int segIndex1)
Parameters
e0
ISegmentStringsegIndex0
inte1
ISegmentStringsegIndex1
int