Exemplo n.º 1
0
        private void AreaStatistics_Click(object sender, EventArgs e)
        {
            StatisticAnalyze statisticAnalyze = new StatisticAnalyze(axMapControl1.Map);
            IFeatureClass    featureClass     = statisticAnalyze.CreateShapefile("D:\\", "deodatabase", "Clip_Polygon");

            if (featureClass == null)
            {
                MessageBox.Show("失败");
                return;
            }
            bool bRes = statisticAnalyze.AddFeatureClassToMap(featureClass, "Clip_Polygon");

            if (!bRes)
            {
                MessageBox.Show("加入");
                return;
            }

            statisticAnalyze.AddPolygonToLayer(m_polygon);

            statisticAnalyze.cilpOperator(axMapControl1.Map, "XZDW", "Clip_Polygon", "D:\\");
            statisticAnalyze.cilpOperator(axMapControl1.Map, "DLTB", "Clip_Polygon", "D:\\");
            statisticAnalyze.cilpOperator(axMapControl1.Map, "LXDW", "Clip_Polygon", "D:\\");

            statisticAnalyze.DLTBquitXZandLX("DLTB_Clip", "XZDW_Clip", "LXDW_Clip");

            DataBoard databoard = new DataBoard("面积统计", statisticAnalyze.GetSt());

            databoard.Show();
        }
Exemplo n.º 2
0
        private void miDeleteLayer_Click(object sender, EventArgs e)
        {
            StatisticAnalyze statisticAnalyze = new StatisticAnalyze(axMapControl1.Map);

            statisticAnalyze.DeleteFeatureDataset("D:\\", "deodatabase", "Clip_Polygon");
        }