Package org.locationtech.jts.noding
Class NodingValidator
- java.lang.Object
-
- org.locationtech.jts.noding.NodingValidator
-
public class NodingValidator extends java.lang.Object
Validates that a collection ofSegmentString
s is correctly noded. Throws an appropriate exception if an noding error is found.- Version:
- 1.7
-
-
Field Summary
Fields Modifier and Type Field Description private static GeometryFactory
fact
private LineIntersector
li
private java.util.Collection
segStrings
-
Constructor Summary
Constructors Constructor Description NodingValidator(java.util.Collection segStrings)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
checkCollapse(Coordinate p0, Coordinate p1, Coordinate p2)
private void
checkCollapses()
Checks if a segment string contains a segment pattern a-b-a (which implies a self-intersection)private void
checkCollapses(SegmentString ss)
private void
checkEndPtVertexIntersections()
Checks for intersections between an endpoint of a segment string and an interior vertex of another segment stringprivate void
checkEndPtVertexIntersections(Coordinate testPt, java.util.Collection segStrings)
private void
checkInteriorIntersections()
Checks all pairs of segments for intersections at an interior point of a segmentprivate void
checkInteriorIntersections(SegmentString e0, int segIndex0, SegmentString e1, int segIndex1)
private void
checkInteriorIntersections(SegmentString ss0, SegmentString ss1)
void
checkValid()
private boolean
hasInteriorIntersection(LineIntersector li, Coordinate p0, Coordinate p1)
-
-
-
Field Detail
-
li
private LineIntersector li
-
segStrings
private java.util.Collection segStrings
-
fact
private static final GeometryFactory fact
-
-
Method Detail
-
checkValid
public void checkValid()
-
checkCollapses
private void checkCollapses()
Checks if a segment string contains a segment pattern a-b-a (which implies a self-intersection)
-
checkCollapses
private void checkCollapses(SegmentString ss)
-
checkCollapse
private void checkCollapse(Coordinate p0, Coordinate p1, Coordinate p2)
-
checkInteriorIntersections
private void checkInteriorIntersections()
Checks all pairs of segments for intersections at an interior point of a segment
-
checkInteriorIntersections
private void checkInteriorIntersections(SegmentString ss0, SegmentString ss1)
-
checkInteriorIntersections
private void checkInteriorIntersections(SegmentString e0, int segIndex0, SegmentString e1, int segIndex1)
-
hasInteriorIntersection
private boolean hasInteriorIntersection(LineIntersector li, Coordinate p0, Coordinate p1)
- Returns:
- true if there is an intersection point which is not an endpoint of the segment p0-p1
-
checkEndPtVertexIntersections
private void checkEndPtVertexIntersections()
Checks for intersections between an endpoint of a segment string and an interior vertex of another segment string
-
checkEndPtVertexIntersections
private void checkEndPtVertexIntersections(Coordinate testPt, java.util.Collection segStrings)
-
-