checkCollapse method
Implementation
void checkCollapse(Coordinate p0, Coordinate p1, Coordinate p2) {
if (p0.equals(p2))
throw new RuntimeException("found non-noded collapse at " +
fact.createLineString([p0, p1, p2]).toText());
}
void checkCollapse(Coordinate p0, Coordinate p1, Coordinate p2) {
if (p0.equals(p2))
throw new RuntimeException("found non-noded collapse at " +
fact.createLineString([p0, p1, p2]).toText());
}