Map1.DataSets(nodelayerindex).Value(i, 1)
'公路节点的纬度
LonNode(i) =
Map1.DataSets(nodelayerindex).Value(i, 2)
'经度
NoNode(i) =
Map1.DataSets(nodelayerindex).Value(i, 3)
'标注
Next i
For i = 1 To nLineNode
LineNode(1, i) =
Map1.DataSets(linelayerindex).Value(i, 1)
'线路的第1个节点
LineNode(2, i) =
Map1.DataSets(linelayerindex).Value(i, 2)
'线路的第2个节点
LineDis(i) =
Map1.DataSets(linelayerindex).Value(i, 3)
'线路长度
Next i
ReDim flagMatrix(1 To nNode, 1 To nNode)
As Boolean
ReDim distmatrix(1 To nNode, 1 To nNode)
As Double
For i = 1 To nNode
'flagMatrix标记节点是否邻接
For j = 1 To nNode '初始化
If i = j Then
flagMatrix(i, j) = True '对角元素
Else
flagMatrix(i, j) = False
End If
Next j
Next i
For i = 1 To nNode
For j = 1 To nLineNode
If (LineNode(1, j) = NoNode(i)) Then
For k = 1 To nNode
|