示例#1
0
 /// <summary>
 /// Copy all nodes from an arg point into this graph.
 /// The node label in the arg point 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).
 /// </summary>
 /// <param name="geomGraph"></param>
 /// <param name="argIndex"></param>
 public virtual void CopyNodesAndLabels(GeometryGraph geomGraph, int argIndex)
 {
     for (IEnumerator nodeIt = geomGraph.GetNodeEnumerator(); nodeIt.MoveNext();)
     {
         Node graphNode = (Node)nodeIt.Current;
         Node newNode   = nodes.AddNode(graphNode.Coordinate);
         newNode.SetLabel(argIndex, graphNode.Label.GetLocation(argIndex));
     }
 }