• 大小: 3.76MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-10-27
  • 语言: C#
  • 标签: ArcEngine  抽稀算法  

资源简介

利用C#+ArcEngine实现面周边点抽稀

资源截图

代码片段和文件信息

using System;
using System.Drawing;
using System.Runtime.InteropServices;
using System.Windows.Forms;
using ESRI.ArcGIS.ADF.baseClasses;
using ESRI.ArcGIS.ADF.CATIDs;
using ESRI.ArcGIS.Controls;
using ESRI.ArcGIS.Carto;
using ESRI.ArcGIS.SystemUI;

namespace PolygonSimplified
{
    /// 
    /// Summary description for CreateNewDocument.
    /// 

    public class CreateNewDocument : baseCommand
    {
        private IHookHelper m_hookHelper = null;

        //constructor
        public CreateNewDocument()
        {
            //update the base properties
            base.m_category = “.NET Samples“;
            base.m_caption = “NewDocument“;
            base.m_message = “Create a new map“;
            base.m_toolTip = “Create a new map“;
            base.m_name = “DotNetTemplate_NewDocumentCommand“;
        }

        #region Overriden Class Methods

        /// 
        /// Occurs when this command is created
        /// 

        /// Instance of the application
        public override void OnCreate(object hook)
        {
            if (m_hookHelper == null)
                m_hookHelper = new HookHelperClass();

            m_hookHelper.Hook = hook;
        }

        /// 
        /// Occurs when this command is clicked
        /// 

        public override void onclick()
        {
            IMapControl3 mapControl = null;

            //get the MapControl from the hook in case the container is a ToolbarControl
            if (m_hookHelper.Hook is IToolbarControl)
            {
                mapControl = (IMapControl3)((IToolbarControl)m_hookHelper.Hook).Buddy;
            }
            //In case the container is MapControl
            else if (m_hookHelper.Hook is IMapControl3)
            {
                mapControl = (IMapControl3)m_hookHelper.Hook;
            }
            else
            {
                MessageBox.Show(“Active control must be MapControl!“ “Warning“ MessageBoxButtons.OK MessageBoxIcon.Exclamation);
                return;
            }

            //check to see if there is an active edit session and whether edits have been made
            DialogResult result;
            IEngineEditor engineEditor = new EngineEditorClass();

            if ((engineEditor.EditState == esriEngineEditState.esriEngineStateEditing) && (engineEditor.HasEdits() == true))
            {
                result = MessageBox.Show(“Would you like to save your edits“ “Save Edits“ MessageBoxButtons.YesNoCancel MessageBoxIcon.Question);

                switch (result)
                {

                    case DialogResult.Cancel:
                        return;

                    case DialogResult.No:
                        engineEditor.StopEditing(false);
                        break;

                    case DialogResult.Yes:
                        engineEditor.

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

     文件       5612  2007-08-03 08:15  PolygonSimplified\PolygonSimplified\Properties\Resources.resx

     文件        249  2007-08-03 08:15  PolygonSimplified\PolygonSimplified\Properties\Settings.settings

     文件       1306  2007-08-03 08:15  PolygonSimplified\PolygonSimplified\Properties\AssemblyInfo.cs

     文件       2858  2007-08-03 08:15  PolygonSimplified\PolygonSimplified\Properties\Resources.Designer.cs

     文件       1115  2007-08-03 08:16  PolygonSimplified\PolygonSimplified\Properties\Settings.Designer.cs

     文件       2238  2007-08-03 08:15  PolygonSimplified\PolygonSimplified\App.ico

     文件       2238  2007-08-03 08:15  PolygonSimplified\PolygonSimplified\Earth.ico

     文件       5597  2011-08-16 15:04  PolygonSimplified\PolygonSimplified\PolygonSimplified.csproj

     文件        490  2007-07-21 01:33  PolygonSimplified\PolygonSimplified\bin\Debug\PolygonSimplified.vshost.exe.manifest

     文件      14328  2011-08-16 21:11  PolygonSimplified\PolygonSimplified\bin\Debug\PolygonSimplified.vshost.exe

     文件      33280  2011-08-16 21:06  PolygonSimplified\PolygonSimplified\bin\Debug\PolygonSimplified.exe

     文件      38400  2011-08-16 21:06  PolygonSimplified\PolygonSimplified\bin\Debug\PolygonSimplified.pdb

     文件        764  2011-08-16 15:12  PolygonSimplified\PolygonSimplified\bin\Debug\polygonTest.shp

     文件        108  2011-08-16 15:12  PolygonSimplified\PolygonSimplified\bin\Debug\polygonTest.shx

     文件         73  2011-04-18 08:28  PolygonSimplified\PolygonSimplified\bin\Debug\polygonTest.dbf

     文件        397  2011-04-18 08:25  PolygonSimplified\PolygonSimplified\bin\Debug\polygonTest.prj

     文件        132  2011-08-16 15:12  PolygonSimplified\PolygonSimplified\bin\Debug\polygonTest.sbn

     文件        116  2011-08-16 15:12  PolygonSimplified\PolygonSimplified\bin\Debug\polygonTest.sbx

     文件       1236  2011-08-16 19:38  PolygonSimplified\PolygonSimplified\bin\Debug\polygonTest2.shp

     文件        108  2011-08-16 19:38  PolygonSimplified\PolygonSimplified\bin\Debug\polygonTest2.shx

     文件         73  2011-04-18 09:57  PolygonSimplified\PolygonSimplified\bin\Debug\polygonTest2.dbf

     文件        397  2011-04-18 09:55  PolygonSimplified\PolygonSimplified\bin\Debug\polygonTest2.prj

     文件        132  2011-08-16 19:38  PolygonSimplified\PolygonSimplified\bin\Debug\polygonTest2.sbn

     文件        116  2011-08-16 19:38  PolygonSimplified\PolygonSimplified\bin\Debug\polygonTest2.sbx

     文件       4608  2007-08-03 08:16  PolygonSimplified\PolygonSimplified\obj\Debug\TempPE\Properties.Resources.Designer.cs.dll

     文件     247193  2011-08-11 21:54  PolygonSimplified\PolygonSimplified\obj\Debug\ResolveAssemblyReference.cache

     文件       8172  2011-08-16 20:41  PolygonSimplified\PolygonSimplified\obj\Debug\PolygonSimplified.MainForm.resources

     文件        180  2011-08-16 15:04  PolygonSimplified\PolygonSimplified\obj\Debug\PolygonSimplified.Properties.Resources.resources

     文件      33280  2011-08-16 21:06  PolygonSimplified\PolygonSimplified\obj\Debug\PolygonSimplified.exe

     文件        717  2011-08-16 21:11  PolygonSimplified\PolygonSimplified\obj\Debug\PolygonSimplified.csproj.FileListAbsolute.txt

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

评论

共有 条评论