Пример #1
0
        /// <summary>
        /// return all towers in a service terrtory
        /// </summary>
        /// <returns></returns>
        public Towers GetTowers()
        {
            Towers            towers      = new Towers();
            IFeatureWorkspace pFWorkspace = (IFeatureWorkspace)_workspace;
            IFeatureClass     pTowerFC    = pFWorkspace.OpenFeatureClass("sde.Towers");

            IFeatureCursor pFcursor = pTowerFC.Search(null, false);
            IFeature       pFeature = pFcursor.NextFeature();

            while (pFeature != null)
            {
                Tower tower = TowerManager.GetTower(pFeature);
                towers.Items.Add(tower);
                pFeature = pFcursor.NextFeature();
            }

            return(towers);
        }