Esempio n. 1
0
 /// <summary>
 /// 将ASCDTSubGraph的结果保存到clusters中
 /// </summary>
 private void CreateClusters()
 {
     if (m_bLocal == false)
     {
         for (int i = 0; i < m_globalSubGraphs.Count; i++)
         {
             Cluster cluster = new Cluster();
             cluster.SetClusterIndex(i + 1);
             ASCDTSubGraph subGraph = m_globalSubGraphs[i];
             List<ITinNode> tinNodes = subGraph.GetNodeList();
             for (int j = 0; j < tinNodes.Count; j++)
             {
                 IPoint newPoint = new PointClass();
                 tinNodes[j].QueryAsPoint(newPoint);
                 IZAware pZAware = newPoint as IZAware;
                 pZAware.ZAware = false;
                 cluster.AddPoint(newPoint);
             }
             cluster.CreateConvexHull(m_dataInfo.GetSpatialReference());
             m_Clusters.AddCluster(cluster);
         }
     }
     else
     {
         for (int i = 0; i < m_localSubGraphs.Count; i++)
         {
             Cluster cluster = new Cluster();
             cluster.SetClusterIndex(i + 1);
             ASCDTSubGraph subGraph = m_localSubGraphs[i];
             List<ITinNode> tinNodes = subGraph.GetNodeList();
             for (int j = 0; j < tinNodes.Count; j++)
             {
                 IPoint newPoint = new PointClass();
                 tinNodes[j].QueryAsPoint(newPoint);
                 IZAware pZAware = newPoint as IZAware;
                 pZAware.ZAware = false;
                 cluster.AddPoint(newPoint);
             }
             cluster.CreateConvexHull(m_dataInfo.GetSpatialReference());
             m_Clusters.AddCluster(cluster);
         }
     }
 }
Esempio n. 2
0
 /// <summary>
 /// 添加新簇
 /// </summary>
 /// <param name="newCluster"></param>
 public void AddCluster(Cluster newCluster)
 {
     m_clusters.Add(newCluster);
 }