• 大小: 6.76MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-11-13
  • 语言: 其他
  • 标签: arcengine  c#  

资源简介

在ArcEngine环境下,三维水淹模型的源代码,一起分享学习。

资源截图

代码片段和文件信息

using System;
using System.Drawing;
using System.Windows.Forms;

using ESRI.ArcGIS.Carto;
using ESRI.ArcGIS.Controls;
using ESRI.ArcGIS.Display;
using ESRI.ArcGIS.Geometry;

using ESRI.ArcGIS.Geodatabase;
using ESRI.ArcGIS.Analyst3D;
using ESRI.ArcGIS.DataSourcesRaster;
using ESRI.ArcGIS.DataSourcesFile;
using System.Text.Regularexpressions;
using System.IO;
using Janus.Windows.EditControls;
using ESRI.ArcGIS.SystemUI;
using CsGL.OpenGL;

namespace 三维水淹模型
{
    public partial class MainForm : Form
    {
        public MainForm()
        {           
            InitializeComponent();
            //鼠标缩放
            this.MouseWheel += new System.Windows.Forms.MouseEventHandler(this.axSceneControl1_Wheel);

        }
        /// 
        /// 定时动作
        /// 

        /// 
        /// 
        private void timeTime_Tick(object sender EventArgs e)
        {
            DateTime datetime = DateTime.Now;
            this.labcTime.Text = datetime.ToString();
        }
        //*************************************************************//
        #region  开始
        #region 数据操作
        /// 
        /// 加载DEM数据
        /// 

        /// 
        /// 
        private void btcDEM_Click(object sender Janus.Windows.Ribbon.CommandEventArgs e)
        {
            try
            {
                ofd.title = “添加DEM数据“;
                ofd.Filter = “Img格式(*.img)|*.img|TIFF格式(*.tif)|*.tif|Bmp格式()(*.bmp)|*.bmp|Jpeg格式(*.jpg)|*.jpg“;
                ofd.ShowDialog();
                string sFilePath = ofd.FileName;
                IRasterlayer pRaster;
                pRaster = new RasterlayerClass();
                pRaster.CreateFromFilePath(sFilePath);
                axSceneControl1.Scene.Addlayer(pRaster true);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
                return;
            }
        }
        /// 
        /// 加载TIF数据
        /// 

        /// 
        /// 
        private void btcTIF_Click(object sender Janus.Windows.Ribbon.CommandEventArgs e)
        {
            try
            {
                ofd.title = “添加tif数据“;
                ofd.Filter = “TIFF格式(*.tif)|*.tif“;
                ofd.ShowDialog();
                string sFilePath = ofd.FileName;
                IRasterlayer pRaster;
                pRaster = new RasterlayerClass();
                pRaster.CreateFromFilePath(sFilePath);
                axSceneControl1.Scene.Addlayer(pRaster true);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
                return;
            }
        }
        /// 
        /// 加载TIN数据
        /// 

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

     文件        117  2013-01-12 11:32  三维水淹模型\app.config

     文件     380928  2002-11-03 22:42  三维水淹模型\bin\Debug\app.publish\Application Files\三维水淹模型_1_0_0_2\csgl.dll.deploy

     文件     221184  2009-09-14 15:32  三维水淹模型\bin\Debug\app.publish\Application Files\三维水淹模型_1_0_0_2\Janus.Data.v3.dll.deploy

     文件     356352  2009-09-14 15:32  三维水淹模型\bin\Debug\app.publish\Application Files\三维水淹模型_1_0_0_2\Janus.Windows.ButtonBar.v3.dll.deploy

     文件     180224  2009-09-14 15:32  三维水淹模型\bin\Debug\app.publish\Application Files\三维水淹模型_1_0_0_2\Janus.Windows.CalendarCombo.v3.dll.deploy

     文件     208896  2009-09-14 15:32  三维水淹模型\bin\Debug\app.publish\Application Files\三维水淹模型_1_0_0_2\Janus.Windows.Common.v3.dll.deploy

     文件     290816  2009-09-14 15:32  三维水淹模型\bin\Debug\app.publish\Application Files\三维水淹模型_1_0_0_2\Janus.Windows.ExplorerBar.v3.dll.deploy

     文件     126976  2009-09-14 15:32  三维水淹模型\bin\Debug\app.publish\Application Files\三维水淹模型_1_0_0_2\Janus.Windows.FilterEditor.v3.dll.deploy

     文件    1372160  2009-09-14 15:32  三维水淹模型\bin\Debug\app.publish\Application Files\三维水淹模型_1_0_0_2\Janus.Windows.GridEX.v3.dll.deploy

     文件     765952  2009-09-14 15:32  三维水淹模型\bin\Debug\app.publish\Application Files\三维水淹模型_1_0_0_2\Janus.Windows.Ribbon.v3.dll.deploy

     文件     786432  2009-09-14 15:32  三维水淹模型\bin\Debug\app.publish\Application Files\三维水淹模型_1_0_0_2\Janus.Windows.Schedule.v3.dll.deploy

     文件     585728  2009-09-14 15:32  三维水淹模型\bin\Debug\app.publish\Application Files\三维水淹模型_1_0_0_2\Janus.Windows.TimeLine.v3.dll.deploy

     文件    1515520  2009-09-14 15:32  三维水淹模型\bin\Debug\app.publish\Application Files\三维水淹模型_1_0_0_2\Janus.Windows.UI.v3.dll.deploy

     文件        117  2013-01-12 11:32  三维水淹模型\bin\Debug\app.publish\Application Files\三维水淹模型_1_0_0_2\三维水淹模型.exe.config.deploy

     文件     308736  2013-01-17 13:10  三维水淹模型\bin\Debug\app.publish\Application Files\三维水淹模型_1_0_0_2\三维水淹模型.exe.deploy

     文件      20845  2013-01-17 13:10  三维水淹模型\bin\Debug\app.publish\Application Files\三维水淹模型_1_0_0_2\三维水淹模型.exe.manifest

     文件     495112  2013-01-17 13:10  三维水淹模型\bin\Debug\app.publish\setup.exe

     文件       5505  2013-01-17 13:10  三维水淹模型\bin\Debug\app.publish\三维水淹模型.application

     文件     380928  2002-11-03 22:42  三维水淹模型\bin\Debug\csgl.dll

     文件     886272  2002-11-03 22:42  三维水淹模型\bin\Debug\csgl.pdb

     文件      53283  2013-01-14 08:49  三维水淹模型\bin\Debug\Help\Help 2.files\Help 2-1061.png

     文件      55624  2013-01-14 08:49  三维水淹模型\bin\Debug\Help\Help 2.files\Help 2-1148.png

     文件      35029  2013-01-14 08:49  三维水淹模型\bin\Debug\Help\Help 2.files\Help 2-1233.png

     文件       2572  2013-01-14 08:49  三维水淹模型\bin\Debug\Help\Help 2.files\Help 2-1621.png

     文件      52307  2013-01-14 08:49  三维水淹模型\bin\Debug\Help\Help 2.files\Help 2-1703.png

     文件      40356  2013-01-14 08:49  三维水淹模型\bin\Debug\Help\Help 2.files\Help 2-1818.png

     文件      66523  2013-01-14 08:49  三维水淹模型\bin\Debug\Help\Help 2.files\Help 2-1912.png

     文件       1621  2013-01-14 08:49  三维水淹模型\bin\Debug\Help\Help 2.files\Help 2-1990.png

     文件      53283  2013-01-14 08:49  三维水淹模型\bin\Debug\Help\Help 2.files\Help 2-2066.png

     文件      37040  2013-01-14 08:49  三维水淹模型\bin\Debug\Help\Help 2.files\Help 2-2178.png

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

评论

共有 条评论