Excel列表坐标点转成带Z值的shape点文件和线文件汇编
Excel列表坐标点转成带Z值的shape点文件和线文件using System;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Linq;usingSystem.Text;usingSystem.Windows.Forms;usingESRI.ArcGIS.Controls;usingESRI.ArcGIS.Geodatabase;usingESRI.ArcGIS.DataSourcesFile;usingESRI.ArcGIS.Geometry;namespaceNetWorkDatamanger{public partial class CreateShpFileBaseOnExcel : Form {privateDataGridViewexcelDataGridViewX;privateAxMapControlaxMapControl;private string fileName;private string filePath;publicCreateShpFileBaseOnExcel(AxMapControl _axMapControl, DataGridView _DataView) {axMapControl = _axMapControl;excelDataGridViewX = _DataView;InitializeComponent(); }private void delFieldButtonX_Click(object sender, EventArgs e) {if (addFieldListBox.SelectedItem != null) {fieldListBox.Items.Add(addFieldListBox.SelectedItem);addFieldListBox.Items.Remove(addFieldListBox.SelectedItem); } }private void addFieldButtonX_Click(object sender, EventArgs e) {if (fieldListBox.SelectedItem != null) {addFieldListBox.Items.Add(fieldListBox.SelectedItem);fieldListBox.Items.Remove(fieldListBox.SelectedItem); } }private void CreateShpFileBaseOnExcel_Load(object sender, EventArgs e) {for (inti = 0; i excelDataGridViewX.Columns.Count; i++) {stringHeaderString = excelDataGridViewX.Columns[i].HeaderText;xComboBoxEx.Items.Add(HeaderString);yComboBoxEx.Items.Add(HeaderString);zComboBoxEx.Items.Add(HeaderString);fieldListBox.Items.Add(HeaderString); } }private void Create_Click(object sender, EventArgs e) {switch (shpTypeComboBox.Text) {case Point:CreatPointShp();break;case Polyline:CreatePolylineShp();break;case PolylineZM:CreatePolylineZMShp();break;default:MessageBox.Show(请选择创建的shp类型!);break; } }public void CreatPointShp() {try {IWorkspaceFactorypShpWksFact = new ShapefileWorkspaceFactory();IFeatureWorkspace
您可能关注的文档
- ETS说明书M981094000ASM汇编.doc
- EVE扫描教程汇编.doc
- EvidenceforProactiveInterferenceintheFocusofAttentionofWorkingMemory汇编.pptx
- eviews统计分析报告汇编.doc
- EULARrecommendationsfortheuseofimaginginthediagnosisandmanagementofspondyloarthritis汇编.ppt
- EVI超低温风冷机组工作原理汇编.doc
- EVS自动验布系统在不同领域的应用汇编.doc
- Excel2000教案汇编.doc
- Excel2003基本应用技巧(课堂讲解)汇编.doc
- EXCEL2007如何制作双坐标轴图(堆积柱状图+折线图)汇编.docx
原创力文档

文档评论(0)