Class FastNodingValidator
- Namespace
- NetTopologySuite.Noding
- Assembly
- NetTopologySuite.dll
Validates that a collection of ISegmentStrings is correctly noded. Indexing is used to improve performance.
public class FastNodingValidator
- Inheritance
-
FastNodingValidator
- Inherited Members
Remarks
By default validation stops after a single non-noded intersection is detected. Alternatively, it can be requested to detect all intersections by using the FindAllIntersections property.
The validator does not check for topology collapse situations (e.g. where two segment strings are fully co-incident). The validator checks for the following situations which indicated incorrect noding:The client may either test the IsValid condition, or request that a suitable TopologyException be thrown.
Constructors
FastNodingValidator(IEnumerable<ISegmentString>)
Creates a new noding validator for a given set of linework.
public FastNodingValidator(IEnumerable<ISegmentString> segStrings)
Parameters
segStrings
IEnumerable<ISegmentString>A collection of ISegmentStrings
- See Also
Properties
FindAllIntersections
Gets or sets whether all intersections should be found.
public bool FindAllIntersections { get; set; }
Property Value
- See Also
Intersections
Gets a list of all intersections found.
public IList<Coordinate> Intersections { get; }
Property Value
- See Also
IsValid
Checks for an intersection and reports if one is found.
public bool IsValid { get; }
Property Value
- See Also
Methods
CheckValid()
Checks for an intersection and throws a TopologyException if one is found.
public void CheckValid()
Exceptions
- TopologyException
if an intersection is found
- See Also
ComputeIntersections(IEnumerable<ISegmentString>)
Gets a list of all intersections found. Intersections are represented as Coordinates. List is empty if none were found.
A collection of SegmentStringspublic static IList<Coordinate> ComputeIntersections(IEnumerable<ISegmentString> segStrings)
Parameters
segStrings
IEnumerable<ISegmentString>
Returns
- See Also
GetErrorMessage()
Returns an error message indicating the segments containing the intersection.
public string GetErrorMessage()
Returns
- string
an error message documenting the intersection location
- See Also