Dim listPoint1 As New List(Of Point3d) 排序并删除zy相同项
n = listPoint1.CountIf n > 0 Then
'根据数据分断方向标识,对界内特征点数据排序
Select Case FXrect
Case "x"
Dim ptstmp = From pt In listPoint1 Select pt Order By pt.X, pt.Y
'//按x为主,y为辅的升序排列
listPoint1 = ptstmp.ToList()
Case "y"
Dim ptstmp = From pt In listPoint1 Select pt Order By pt.Y, pt.X
'//按y为主,x为辅的升序排列
listPoint1 = ptstmp.ToList()
End Select
'添加界内特征点(剔除XY坐标相同点)进总特征点集
For m = 0 To n - 1
If m = 0 Then
VerPoint.Add(listPoint1(m))
Else
If listPoint1(m).X <> listPoint1(m - 1).X Or listPoint1(m).Y <> listPoint1(m - 1).Y Then
VerPoint.Add(listPoint1(m))
End If
End If
Next
'listPoint1.Clear()
End If 这段代码能优化吗,想提高计算速度,数据量极大!!!!
页:
[1]