private void checkInteriorIntersections(SegmentString e0, int segIndex0, SegmentString e1, int segIndex1) { if (e0 == e1 && segIndex0 == segIndex1) return; //numTests++; Coordinate p00 = e0.getCoordinates()[segIndex0]; Coordinate p01 = e0.getCoordinates()[segIndex0 + 1]; Coordinate p10 = e1.getCoordinates()[segIndex1]; Coordinate p11 = e1.getCoordinates()[segIndex1 + 1]; li.computeIntersection(p00, p01, p10, p11); if (li.hasIntersection()) { if (li.isProper() || hasInteriorIntersection(li, p00, p01) || hasInteriorIntersection(li, p10, p11)) { throw new RuntimeException("found non-noded intersection at " + p00 + "-" + p01 + " and " + p10 + "-" + p11); } } } /**
boolean isProper = li.isProper(); if (isProper) hasProperIntersection = true;
((NodedSegmentString) e0).addIntersections(li, segIndex0, 0); ((NodedSegmentString) e1).addIntersections(li, segIndex1, 1); if (li.isProper()) { numProperIntersections++;
lineIntersector.getIntersectionNum(); lineIntersector.getIntersection(0); lineIntersector.isProper(); lineIntersector.hasIntersection(); q2 = new Coordinate(30, 10); lineIntersector.computeIntersection(p1, p2, q1, q2); lineIntersector.isProper(); lineIntersector.hasIntersection(); q2 = new Coordinate(30, 10); lineIntersector.computeIntersection(p1, p2, q1, q2); lineIntersector.isProper(); lineIntersector.hasIntersection(); q2 = new Coordinate(30, 10); lineIntersector.computeIntersection(p1, p2, q1, q2); lineIntersector.isProper(); lineIntersector.hasIntersection(); lineIntersector.hasIntersection(); lineIntersector.getIntersectionNum(); lineIntersector.isProper(); lineIntersector.hasIntersection(); lineIntersector.getIntersectionNum(); lineIntersector.isProper();