• 大小: 4.88MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-09-18
  • 语言: 其他
  • 标签: arcGisEngine  

资源简介

ArcGisEngine二次开发的例子,里面包含了最短路径,唯一值渲染,点选事件,图地要素编辑,鹰眼...

资源截图

代码片段和文件信息

using ESRI.ArcGIS.Carto;
using ESRI.ArcGIS.DataSourcesGDB;
using ESRI.ArcGIS.Geodatabase;
using ESRI.ArcGIS.Geometry;
using ESRI.ArcGIS.NetworkAnalysis;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace MySchool
{
    public partial class Administrator : Form
    {
        public Administrator()
        {
            InitializeComponent();

            m_ipActiveView = axMapControl1.ActiveView;
            m_ipMap = m_ipActiveView.FocusMap;
        }
        private IGeometricNetwork m_ipGeometricNetwork;
        private IMap m_ipMap;
        private IPointCollection m_ipPoints;//输入点集合
        private IPointToEID m_ipPointToEID;
       
        private IActiveView m_ipActiveView;


        private void Administrator_Load(object sender EventArgs e)
        {
            this.axToolbarControl1.SetBuddyControl(this.axMapControl1);
            this.axTOCControl1.SetBuddyControl(this.axMapControl1);
            string strPath = commonValue.path;
            OpenAccessNetwork(strPath “trip“);
            ESRI.ArcGIS.Controls.IMapControl3 pMapControl = (ESRI.ArcGIS.Controls.IMapControl3)axMapControl1.object;
            pMapControl.CurrentTool = null;
            axMapControl1.MousePointer = ESRI.ArcGIS.Controls.esriControlsMousePointer.esriPointerDefault;
        }


        public void OpenAccessNetwork(string AccessFileName string FeatureDatasetName)
        {
            IWorkspaceFactory ipWorkspaceFactory;
            IWorkspace ipWorkspace;
            IFeatureWorkspace ipFeatureWorkspace;
            IFeatureDataset ipFeatureDataset;

            //open the mdb
            ipWorkspaceFactory = new AccessWorkspaceFactory();
            ipWorkspace = ipWorkspaceFactory.OpenFromFile(AccessFileName 0);

            //et the FeatureWorkspace
            ipFeatureWorkspace = ipWorkspace as IFeatureWorkspace;

            //open the FeatureDataset
            ipFeatureDataset = ipFeatureWorkspace.OpenFeatureDataset(FeatureDatasetName);

            //initialize Network and Map (m_ipNetwork m_ipMap)
            if (!InitializeNetworkAndMap(ipFeatureDataset))
            {
                MessageBox.Show(“Error!“);
            }
        }


    
        //************************************
        // 
        // 初始化几何网络和地图 
        // Parameter: IFeatureDataset FeatureDataset
        // author:    zxf
        // @date    :  2016/6/28 13:33
        // Returns:   bool
        //************************************
        private bool InitializeNetworkAndMap(IFeatureDataset FeatureDataset)
        {
            IFeatureClassContainer ipFeatureClassContainer;
            IFeatureClass ipFeatureClass;
            IGeoDataset ipGeoDataset;
            ilayer iplayer;
            IFeaturelayer ipF

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       5640  2016-07-08 16:44  MySchool\MySchool\Administrator.cs

     文件       6724  2016-07-08 13:22  MySchool\MySchool\Administrator.Designer.cs

     文件      12295  2016-07-08 16:44  MySchool\MySchool\Administrator.resx

     文件      20139  2016-06-28 10:36  MySchool\MySchool\bin\Debug\Calmness.ssk

     文件      20271  2016-06-28 10:36  MySchool\MySchool\bin\Debug\CalmnessColor1.ssk

     文件      20208  2016-06-28 10:36  MySchool\MySchool\bin\Debug\CalmnessColor2.ssk

     文件       5032  2016-06-28 10:36  MySchool\MySchool\bin\Debug\DeepCyan.ssk

     文件       5037  2016-06-28 10:36  MySchool\MySchool\bin\Debug\DeepGreen.ssk

     文件       4908  2016-06-28 10:36  MySchool\MySchool\bin\Debug\DeepOrange.ssk

     文件      16021  2016-06-28 10:36  MySchool\MySchool\bin\Debug\DiamondBlue.ssk

     文件      16669  2016-06-28 10:36  MySchool\MySchool\bin\Debug\DiamondGreen.ssk

     文件      16211  2016-06-28 10:36  MySchool\MySchool\bin\Debug\DiamondOlive.ssk

     文件      16031  2016-06-28 10:36  MySchool\MySchool\bin\Debug\DiamondPurple.ssk

     文件      15998  2016-06-28 10:36  MySchool\MySchool\bin\Debug\DiamondRed.ssk

     文件      10439  2016-06-28 10:36  MySchool\MySchool\bin\Debug\Eighteen.ssk

     文件      10382  2016-06-28 10:36  MySchool\MySchool\bin\Debug\EighteenColor1.ssk

     文件       9746  2016-06-28 10:36  MySchool\MySchool\bin\Debug\EighteenColor2.ssk

     文件      12591  2016-06-28 10:36  MySchool\MySchool\bin\Debug\Emerald.ssk

     文件      12261  2016-06-28 10:36  MySchool\MySchool\bin\Debug\EmeraldColor1.ssk

     文件      12360  2016-06-28 10:36  MySchool\MySchool\bin\Debug\EmeraldColor2.ssk

     文件      11422  2016-06-28 10:36  MySchool\MySchool\bin\Debug\EmeraldColor3.ssk

     文件     155648  2010-05-19 15:37  MySchool\MySchool\bin\Debug\ESRI.ArcGIS.ADF.Local.dll

     文件     608894  2009-07-14 09:55  MySchool\MySchool\bin\Debug\ESRI.ArcGIS.ADF.Local.xml

     文件     118784  2010-05-19 14:12  MySchool\MySchool\bin\Debug\ESRI.ArcGIS.AxControls.dll

     文件    2301952  2010-05-19 13:24  MySchool\MySchool\bin\Debug\ESRI.ArcGIS.Carto.dll

     文件    7801392  2009-11-04 16:14  MySchool\MySchool\bin\Debug\ESRI.ArcGIS.Carto.xml

     文件     602112  2010-05-19 14:12  MySchool\MySchool\bin\Debug\ESRI.ArcGIS.Controls.dll

     文件    2364792  2009-11-04 16:14  MySchool\MySchool\bin\Debug\ESRI.ArcGIS.Controls.xml

     文件     507904  2010-05-19 13:12  MySchool\MySchool\bin\Debug\ESRI.ArcGIS.DataSourcesRaster.dll

     文件    1953922  2009-11-04 16:14  MySchool\MySchool\bin\Debug\ESRI.ArcGIS.DataSourcesRaster.xml

............此处省略159个文件信息

评论

共有 条评论