checkSplitEdgesCorrectness method
Checks the correctness of the set of split edges corresponding to this edge.
@param splitEdges the split edges for this edge (in order)
Implementation
void checkSplitEdgesCorrectness(List splitEdges) {
List<Coordinate> edgePts = edge.getCoordinates();
// check that first and last points of split edges are same as endpoints of edge
SegmentString split0 = splitEdges[0];
Coordinate pt0 = split0.getCoordinate(0);
if (!pt0.equals2D(edgePts[0]))
throw new RuntimeException(
"bad split edge start point at " + pt0.toString());
SegmentString splitn = splitEdges[splitEdges.length - 1];
List<Coordinate> splitnPts = splitn.getCoordinates();
Coordinate ptn = splitnPts[splitnPts.length - 1];
if (!ptn.equals2D(edgePts[edgePts.length - 1]))
throw new RuntimeException(
"bad split edge end point at " + ptn.toString());
}