copyNodesAndLabels method

void copyNodesAndLabels(
  1. int argIndex
)

Copy all nodes from an arg geometry into this graph. The node label in the arg geometry overrides any previously computed label for that argIndex. (E.g. a node may be an intersection node with a computed label of BOUNDARY, but in the original arg Geometry it is actually in the interior due to the Boundary Determination Rule)

Implementation

void copyNodesAndLabels(int argIndex) {
  for (Iterator i = arg[argIndex].getNodeIterator(); i.moveNext();) {
    Node graphNode = i.current as Node;
    Node newNode = nodes.addNodeFromCoordinate(graphNode.getCoordinate());
    newNode.setLabelWithIndex(
        argIndex, graphNode.getLabel()!.getLocation(argIndex));
//node.print(System.out);
  }
}