computeNodedEdges method

void computeNodedEdges(
  1. List bufferSegStrList,
  2. PrecisionModel precisionModel
)

Implementation

void computeNodedEdges(List bufferSegStrList, PrecisionModel precisionModel) {
  Noder noder = getNoder(precisionModel);
  noder.computeNodes(bufferSegStrList);
  List nodedSegStrings = noder.getNodedSubstrings();
// DEBUGGING ONLY
//BufferDebug.saveEdges(nodedEdges, "run" + BufferDebug.runCount + "_nodedEdges");

  for (SegmentString segStr in nodedSegStrings) {
    /**
     * Discard edges which have zero length,
     * since they carry no information and cause problems with topology building
     */
    List<Coordinate> pts = segStr.getCoordinates();
    if (pts.length == 2 && pts[0].equals2D(pts[1])) continue;

    Label oldLabel = segStr.getData() as Label;
    Edge edge =
        new Edge(segStr.getCoordinates(), new Label.fromLabel(oldLabel));
    insertUniqueEdge(edge);
  }
  //saveEdges(edgeList.getEdges(), "run" + runCount + "_collapsedEdges");
}