Arcengine中调用ArcToolbox工具(Geoprocessing)
来源:互联网 发布:专门画画的软件 编辑:程序博客网 时间:2024/05/16 16:16
geoprocessing唯一难的地方就是参数,需要根据不同的情况设置,
我就以intersect方法为例,编程实现两个图层的intersect.
新建一个项目,添加引用,我们用的工具intersect是在AnalysisTools中的,
在form中加一个button,然后实现其方法,如下,
别忘了添加命名空间
using ESRI.ArcGIS.esriSystem;
using ESRI.ArcGIS.Geoprocessor;
//实现button click方法
private void button1_Click(object sender, EventArgs e)
{
//构造Geoprocessor
ESRI.ArcGIS.Geoprocessor.Geoprocessor gp = new ESRI.ArcGIS.Geoprocessor.Geoprocessor();
//设置参数
ESRI.ArcGIS.AnalysisTools.Intersect intersect = new ESRI.ArcGIS.AnalysisTools.Intersect();
intersect.in_features = @"F:/foshan/Data/wuqutu_b.shp;F:/foshan/Data/world30.shp";
intersect.out_feature_class = @"E:/intersect.shp";
intersect.join_attributes = "ONLY_FID";
//执行Intersect工具
RunTool(gp, intersect, null);
}
private void RunTool(Geoprocessor geoprocessor, IGPProcess process, ITrackCancel TC)
{
// Set the overwrite output option to true
geoprocessor.OverwriteOutput = true;
try
{
geoprocessor.Execute(process, null);
ReturnMessages(geoprocessor);
}
catch (Exception err)
{
Console.WriteLine(err.Message);
ReturnMessages(geoprocessor);
}
}
// Function for returning the tool messages.
private void ReturnMessages(Geoprocessor gp)
{
string ms = "";
if (gp.MessageCount > 0)
{
for (int Count = 0; Count <= gp.MessageCount - 1; Count++)
{
ms += gp.GetMessage(Count);
}
}
}
- Arcengine中调用ArcToolbox工具(Geoprocessing)
- 在ArcEngine中调用ArcToolBox中的copyfeatures工具
- ArcEngine中使用Geoprocessing
- 在ArcEngine中使用Geoprocessing工具-执行工具
- 在ArcEngine中使用Geoprocessing工具-执行工具
- 在ArcEngine中使用Geoprocessing工具-执行工具
- 在ArcEngine中使用Geoprocessing工具-执行工具
- arcengine 实现调用arctoolbox中的dissolove
- arcengine 调用arctoolbox功能的举例 spatialJoin
- Engine中调用Geoprocessing工具相应的许可要求
- Engine中调用Geoprocessing工具相应的许可要求
- C#+AE调用ArcToolbox工具
- C#+AE调用ArcToolbox工具
- AE直接调用GeoProcessing 工具
- arctoolbox工具
- ArcGIS Engine调用ArcToolbox工具时环境变量的设置
- c# 调用ArcEngine的GP工具
- ArcEngine 调用GP样条插值工具,出错
- 别
- C语言系统资源控制(getrlimit && setrlimit)
- jsp网站
- 使用BindingList实现DataGridView的动态绑定
- 中国股市的真相
- Arcengine中调用ArcToolbox工具(Geoprocessing)
- TCPIP网络协议层对应的RFC文档
- 关于虚拟机
- FI01-FI中的组织单位
- 请问高手
- 缺少standard.jar报的错误
- 初学者的迷惑
- WEB编程中POST/GET的具体区别
- 如何添加显示桌面到快速启动栏【Windows XP】?