基于C#的AE二次开发之测量点坐标txt数据转Shapefile点数据
在日常数据处理中,我们经常需要将点txt文本文件转换成带属性信息的图形文件,以满足后期数据处理的需要。常用的方法有很多,这里采用基于C#的AE二次开发方式来完成该转换。
1、程序界面
2、数据准备
坐标文本文件.txt(某航摄分区POS点数据)
3、代码块
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.Geodatabase;
using System.IO;
using ESRI.ArcGIS.DataSourcesFile;
using ESRI.ArcGIS.Geometry;
using System.Runtime.InteropServices;
using System.Collections;
using System.Reflection;
namespace 展点
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button4_Click(object sender, EventArgs e)
{
base.Dispose();
base.Close();
}
private void button5_Click(object sender, EventArgs e)
{
//***指定点文件路径
OpenFileDialog ofd = new OpenFileDialog
{
Filter = "点文件|*.txt"
};
if (ofd.ShowDialog() == DialogResult.OK)
{
this.textBox3.Text = ofd.FileName.Trim();
}
}
private void button2_Click(object sender, EventArgs e)
{
//***指定生成的shp文件路径
SaveFileDialog ofd = new SaveFileDialog
{
Filter = "结合表SHP文件|*.shp"
};
if (ofd.ShowDialog() == DialogResult.OK)