资源简介

按照一个教程在做ArcEngine10.0三维开发,该系统分为四个模块,分别是文件的操作、场景的浏览、点查询和矢量文件生成TIN。

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ESRI.ArcGIS.Carto;
using ESRI.ArcGIS.Geodatabase;
using ESRI.ArcGIS.Geometry;
using ESRI.ArcGIS.Analyst3D;
using ESRI.ArcGIS.Controls;
using ESRI.ArcGIS.SystemUI;

namespace SanWeiFenXi
{
    public partial class Form1 : Form
    {
        //private AxSceneControl scenecontrol;
        public Form1()
        {
            InitializeComponent();
         
        }



        /************************************************************************/
        /*                  “打开sxd文件“按钮按下事件                           */
        /************************************************************************/
        //打开sxd工程文件
        private void OpenSxdFile_Click(object sender EventArgs e)
        {
            mOpenFileDialog.Filter = “三维场景(*.sxd)|*.sxd“;
            mOpenFileDialog.InitialDirectory = @“G:\资料\ArcGIS汤国安“;
            mOpenFileDialog.Multiselect = false;
            DialogResult pDialogResult = mOpenFileDialog.ShowDialog();
            if (pDialogResult != DialogResult.OK)
                return;

            string pFileName = mOpenFileDialog.FileName;
            mSceneControl.LoadSxFile(pFileName);


            ////打开文件对话框打开事件
            //if (mOpenFileDialog.ShowDialog() == DialogResult.OK)
            //{
            //    //从打开对话框中得到打开文件的全路径并将该路径传入到mSceneControl中
            //    mSceneControl.LoadSxFile(mOpenFileDialog.FileName);
            //}

        }



        /************************************************************************/
        /*                  “打开Raster文件“按钮按下事件                        */
        /************************************************************************/
        //向工程中添加栅格数据

        private void OpenRasterFile_Click(object sender EventArgs e)
        {
            //OpenFileDialog mOpenFileDialog = new OpenFileDialog();
            string sFileName = null;
            //新建栅格图层
            IRasterlayer pRasterlayer = null;
            pRasterlayer = new RasterlayerClass();
            //取消文件过滤
            mOpenFileDialog.Filter = “所有文件|*.*“;
            //打开文件对话框打开事件
            if (mOpenFileDialog.ShowDialog() == DialogResult.OK)
            {
                //从打开对话框中得到打开文件的全路径
                sFileName = mOpenFileDialog.FileName;
                //创建栅格图层
                pRasterlayer.CreateFromFilePath(sFileName);
                //将图层加入到控件中
                mSceneControl.Scene.Addlayer(pRasterlayer true);
                //将当前视点跳转到栅格图层
                ICamera pCamera = mSceneControl.Scene.SceneGraph.ActiveViewer.Camera;
                //得到范围
                IEnvelope pEenvelop = pRasterlayer.VisibleExtent;
                //添加z轴上的范围
                pEenvelop.ZMin = mSceneControl.Scene.Extent.ZMin;
           

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2014-10-14 08:37  SanWeiFenXi\
     目录           0  2014-10-14 08:37  SanWeiFenXi\SanWeiFenXi\
     文件         875  2013-06-22 08:49  SanWeiFenXi\SanWeiFenXi.sln
     文件       27136  2013-06-23 22:28  SanWeiFenXi\SanWeiFenXi.suo
     目录           0  2013-06-26 22:22  SanWeiFenXi\SanWeiFenXi\bin\
     目录           0  2014-10-14 08:37  SanWeiFenXi\SanWeiFenXi\bin\Debug\
     文件       27648  2013-06-22 13:48  SanWeiFenXi\SanWeiFenXi\bin\Debug\SanWeiFenXi.exe
     文件       36352  2013-06-22 13:48  SanWeiFenXi\SanWeiFenXi\bin\Debug\SanWeiFenXi.pdb
     文件       11600  2013-06-23 22:26  SanWeiFenXi\SanWeiFenXi\bin\Debug\SanWeiFenXi.vshost.exe
     文件         490  2010-03-17 22:39  SanWeiFenXi\SanWeiFenXi\bin\Debug\SanWeiFenXi.vshost.exe.manifest
     文件       13949  2013-06-22 12:59  SanWeiFenXi\SanWeiFenXi\Form1.cs
     文件       16596  2013-06-22 10:11  SanWeiFenXi\SanWeiFenXi\Form1.Designer.cs
     文件        9228  2013-06-22 10:11  SanWeiFenXi\SanWeiFenXi\Form1.resx
     目录           0  2013-06-26 22:22  SanWeiFenXi\SanWeiFenXi\obj\
     目录           0  2013-06-26 22:22  SanWeiFenXi\SanWeiFenXi\obj\x86\
     目录           0  2014-10-14 08:37  SanWeiFenXi\SanWeiFenXi\obj\x86\Debug\
     文件      121456  2013-06-22 09:41  SanWeiFenXi\SanWeiFenXi\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache
     文件        7439  2013-06-22 13:48  SanWeiFenXi\SanWeiFenXi\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache
     文件         360  2013-06-22 10:17  SanWeiFenXi\SanWeiFenXi\obj\x86\Debug\GenerateResource.read.1.tlog
     文件         890  2013-06-22 10:17  SanWeiFenXi\SanWeiFenXi\obj\x86\Debug\GenerateResource.write.1.tlog
     文件       98433  2013-06-22 13:48  SanWeiFenXi\SanWeiFenXi\obj\x86\Debug\ResolveAssemblyReference.cache
     文件         840  2013-06-23 22:26  SanWeiFenXi\SanWeiFenXi\obj\x86\Debug\SanWeiFenXi.csproj.FileListAbsolute.txt
     文件       27648  2013-06-22 13:48  SanWeiFenXi\SanWeiFenXi\obj\x86\Debug\SanWeiFenXi.exe
     文件        2306  2013-06-22 10:17  SanWeiFenXi\SanWeiFenXi\obj\x86\Debug\SanWeiFenXi.Form1.resources
     文件       36352  2013-06-22 13:48  SanWeiFenXi\SanWeiFenXi\obj\x86\Debug\SanWeiFenXi.pdb
     文件         180  2013-06-22 10:17  SanWeiFenXi\SanWeiFenXi\obj\x86\Debug\SanWeiFenXi.Properties.Resources.resources
     文件         180  2013-06-22 10:17  SanWeiFenXi\SanWeiFenXi\obj\x86\Debug\SanWeiFenXi.ResultForm.resources
     目录           0  2013-06-22 08:49  SanWeiFenXi\SanWeiFenXi\obj\x86\Debug\TempPE\
     文件         579  2013-06-22 09:48  SanWeiFenXi\SanWeiFenXi\Program.cs
     目录           0  2014-10-14 08:37  SanWeiFenXi\SanWeiFenXi\Properties\
     文件        1354  2013-06-22 08:49  SanWeiFenXi\SanWeiFenXi\Properties\AssemblyInfo.cs
............此处省略8个文件信息

评论

共有 条评论