当前位置:网站首页>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);
}
}
边栏推荐
猜你喜欢
随机推荐
mongodb的shell脚本
Neo4j 4.X:导入OWL文件
线程基础(二)
差分(前缀和的逆运算)
postman将接口返回结果生成json文件到本地
The ORB - SLAM2 extracting feature points
用云机器/虚拟机架设方舟游戏?
2022用户画像构建
解决移动端有纵向滚动条但是不能滚动的问题
boot - SSE
pyspark---low frequency feature processing
idea远程debug
mysql存生僻字奇怪问题,mysql为什么不能辨别mb4字符?
drop database出现1010
ViewModel 记录下 +
【云原生--Kubernetes】Pod重启策略
RHCSA第四天
集群
推荐系统-排序层-模型:Wide&Deep
volta管理node版本









