SegmentIntersector si = new SegmentIntersector(li, true, false);
// get an instance for an edgeSetIntersector (here: MC Sweepline
// Intersector)
EdgeSetIntersector esi = this.createEdgeSetIntersector();
// optimized test for Polygons and Rings
if (!computeRingSelfNodes
&& (parentGeom instanceof Ring
|| parentGeom instanceof Surface
|| parentGeom instanceof MultiPrimitive)) {
// TODO auskommentiert; checken!
// && (parentGeom instanceof LinearRing
// || parentGeom instanceof Polygon
// || parentGeom instanceof MultiPolygon)
// Compute Intersections without self-intersections
esi.computeIntersections(edges, si, false);
} else {
// Compute Intersections with self-intersections
esi.computeIntersections(edges, si, true);
}
// System.out.println("SegmentIntersector # tests = " + si.numTests);
addSelfIntersectionNodes(argIndex);
return si;