• 大小: 56KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-16
  • 语言: C#
  • 标签: C#  AecEngine  加载  打开  Las  

资源简介

C#+ArcEngine:Visual Studio 2010 加载打开Las点云数据(窗体+代码)

资源截图

代码片段和文件信息

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.GeoDatabaseExtensions;
using ESRI.ArcGIS.Geodatabase;
using ESRI.ArcGIS.Carto;

namespace 加载Las点云数据
{
    public partial class MainForm : Form
    {
        public MainForm()
        {
            InitializeComponent();
        }

        //创建Lasd
        private void button1_Click(object sender EventArgs e)
        {
            OpenFileDialog LasFile = new OpenFileDialog();
            LasFile.Filter += “点云数据(*.las)|*.las“;

            if (LasFile.ShowDialog() == DialogResult.OK)
            {
                string LasFilePath = LasFile.FileName;
                string FileFolder = System.IO.Path.GetDirectoryName(LasFilePath);
                string FileName = System.IO.Path.GetFileName(LasFilePath);

                ILasDataset pLasDataset = new LasDatasetClass();
                pLasDataset.SaveAs(LasFilePath + “d“ true);

                ILasDatasetEdit pLasDatasetEdit = (ILasDatasetEdit)pLasDataset;
                pLasDatasetEdit.AddFile(LasFilePath);
                pLasDatasetEdit.Save();
            }
        }

        //打开Lasd数据集
        private void button2_Click(object sender EventArgs e)
        {
            OpenFileDialog openFile = new OpenFileDialog();
            openFile.Filter += “点云数据(*.lasd)|*.lasd“;

            if (openFile.ShowDialog() == DialogResult.OK)
            {
                string LasdFilePath = openFile.FileName;
                string FileFolder = System.IO.Path.GetDirectoryName(LasdFilePath);
                string FileName = System.IO.Path.GetFileName(LasdFilePath);

                IWorkspaceFactory pwsf = new LasDatasetWorkspaceFactoryClass();
                IWorkspace pws = pwsf.OpenFromFile(FileFolder 0);

                ILasDatasetWorkspace ppws = (ILasDatasetWorkspace)pws;
                ILasDataset ppds = ppws.OpenLasDataset(FileName);
                ILasDatasetlayer ppdsl = new LasDatasetlayerClass();
                ppdsl.Dataset = ppds;

                axMapControl1.Addlayer(ppdsl);
                axMapControl1.ActiveView.Refresh();
            }
        }
    }
}

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

     文件      16384  2017-03-10 16:34  C#+ArcEngine:加载Las点云数据\加载Las点云数据\bin\Debug\加载Las点云数据.exe

     文件      26112  2017-03-10 16:34  C#+ArcEngine:加载Las点云数据\加载Las点云数据\bin\Debug\加载Las点云数据.pdb

     文件      11600  2017-03-10 16:34  C#+ArcEngine:加载Las点云数据\加载Las点云数据\bin\Debug\加载Las点云数据.vshost.exe

     文件        490  2016-07-16 19:44  C#+ArcEngine:加载Las点云数据\加载Las点云数据\bin\Debug\加载Las点云数据.vshost.exe.manifest

     文件       2378  2017-03-10 16:34  C#+ArcEngine:加载Las点云数据\加载Las点云数据\MainForm.cs

     文件       7021  2017-03-10 16:34  C#+ArcEngine:加载Las点云数据\加载Las点云数据\MainForm.Designer.cs

     文件      10607  2017-03-10 16:34  C#+ArcEngine:加载Las点云数据\加载Las点云数据\MainForm.resx

     文件       2867  2017-02-28 10:25  C#+ArcEngine:加载Las点云数据\加载Las点云数据\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache

     文件       7285  2017-03-10 16:34  C#+ArcEngine:加载Las点云数据\加载Las点云数据\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件        753  2017-03-10 16:34  C#+ArcEngine:加载Las点云数据\加载Las点云数据\obj\x86\Debug\加载Las点云数据.csproj.FileListAbsolute.txt

     文件        978  2017-03-10 16:34  C#+ArcEngine:加载Las点云数据\加载Las点云数据\obj\x86\Debug\加载Las点云数据.csproj.GenerateResource.Cache

     文件      16384  2017-03-10 16:34  C#+ArcEngine:加载Las点云数据\加载Las点云数据\obj\x86\Debug\加载Las点云数据.exe

     文件       3392  2017-03-10 16:34  C#+ArcEngine:加载Las点云数据\加载Las点云数据\obj\x86\Debug\加载Las点云数据.MainForm.resources

     文件      26112  2017-03-10 16:34  C#+ArcEngine:加载Las点云数据\加载Las点云数据\obj\x86\Debug\加载Las点云数据.pdb

     文件        180  2017-03-10 16:27  C#+ArcEngine:加载Las点云数据\加载Las点云数据\obj\x86\Debug\加载Las点云数据.Properties.Resources.resources

     文件        592  2017-03-10 16:30  C#+ArcEngine:加载Las点云数据\加载Las点云数据\Program.cs

     文件       1374  2017-02-28 10:25  C#+ArcEngine:加载Las点云数据\加载Las点云数据\Properties\AssemblyInfo.cs

     文件       2894  2017-02-28 10:25  C#+ArcEngine:加载Las点云数据\加载Las点云数据\Properties\Resources.Designer.cs

     文件       5612  2017-02-28 10:25  C#+ArcEngine:加载Las点云数据\加载Las点云数据\Properties\Resources.resx

     文件       1108  2017-02-28 10:25  C#+ArcEngine:加载Las点云数据\加载Las点云数据\Properties\Settings.Designer.cs

     文件        249  2017-02-28 10:25  C#+ArcEngine:加载Las点云数据\加载Las点云数据\Properties\Settings.settings

     文件       6257  2017-03-10 16:27  C#+ArcEngine:加载Las点云数据\加载Las点云数据\加载Las点云数据.csproj

     文件        905  2017-02-28 10:25  C#+ArcEngine:加载Las点云数据\加载Las点云数据.sln

    ..A..H.     25600  2017-03-10 16:34  C#+ArcEngine:加载Las点云数据\加载Las点云数据.suo

     文件       9407  2017-03-10 16:12  C#+ArcEngine:加载Las点云数据\点云.las

     目录          0  2017-02-28 10:25  C#+ArcEngine:加载Las点云数据\加载Las点云数据\obj\x86\Debug\TempPE

     目录          0  2017-03-10 16:34  C#+ArcEngine:加载Las点云数据\加载Las点云数据\obj\x86\Debug

     目录          0  2017-03-10 16:34  C#+ArcEngine:加载Las点云数据\加载Las点云数据\bin\Debug

     目录          0  2017-02-28 10:25  C#+ArcEngine:加载Las点云数据\加载Las点云数据\bin\Release

     目录          0  2017-03-10 16:34  C#+ArcEngine:加载Las点云数据\加载Las点云数据\obj\x86

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

评论

共有 条评论