当前位置:网站首页>ArcEngine(一)加载矢量数据
ArcEngine(一)加载矢量数据
2022-08-03 07:28:00 【稻田里展望者】
利用MarControl控件添加矢量数据
private void 加载矢量数据ToolStripMenuItem_Click(object sender, EventArgs e)
{
//打开文件对话框
OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.Title = "加载shapefile数据";//设置title
openFileDialog.Filter = "(*.shp)|*.shp";//设置过滤模式
if (openFileDialog.ShowDialog() == DialogResult.OK)
{
//设置路径
string fullPath = openFileDialog.FileName;//全部路径
string path = fullPath.Substring(0,fullPath.LastIndexOf("\\"));//截取字符串:除了名称之前的数据
string name = fullPath.Substring(fullPath.LastIndexOf("\\")+1);//一直截取到末尾
//添加图层
MapControl.AddShapeFile(path, name);
//刷新底图
MapControl.Refresh();
MessageBox.Show("文件加载成功", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
边栏推荐
- 如何在安装GBase 8c数据库的时候,报错显示“Host ips belong to different cluster?
- 安全狗云原生安全能力全面亮相全球数字经济大会暨ISC互联网安全大会
- ViewModel 记录下 +
- 【OpenCV】 - 显示图像API之imshow()对不同位深度(数据类型)的图像的处理方法
- C语言入门实战(14):选择排序
- REST学习
- Qt5开发从入门到精通——第二篇(控件篇)
- postman将接口返回结果生成csv文件到本地
- Data warehouse buried point system and attribution practice
- Postman will return to results generated CSV file to the local interface
猜你喜欢

循环神经网络RNN基础《PyTorch深度学习实践》

Haisi project summary

Detailed explanation of cause and effect diagram of test case design method

WordPress主题-B2美化通用子主题商业运营版

RHCSA第四天

分布式数据库数据一致性的原理、与技术实现方案

Nanny level explains Transformer

rust 学习笔记

【着色器实现Glow可控局部发光效果_Shader效果第十三篇】

mysql5.7服务器The innodb_system data file 'ibdata1' must be writable导致无法启动服务器
随机推荐
“唯一索引允许为空“ 的说法是不严谨的
6.nodejs--promise、async-await
【着色器实现HandDrawn简笔画抖动效果_Shader效果第十二篇】
information_schema
依赖注入(DI),自动配置,集合注入
volta管理node版本
循环神经网络RNN基础《PyTorch深度学习实践》
集群
被数据分析重塑的5个行业
Fortify白盒神器20.1.1下载及安装(非百度网盘)
xshell开启ssh端口转发,通过公网机器访问内网机器
Shell运维开发基础(一)
Postman will return to the interface to generate a json file to the local
Roson的Qt之旅#105 QML Image引用大尺寸图片
HCIP笔记整理 2022/7/18
Karatsuba大数乘法的Verilog实现
REST学习
请求与响应:响应
pyspark---low frequency feature processing
consul理解