我是靠谱客的博主 坦率花生,这篇文章主要介绍调用gp工具-相交,现在分享给大家,希望可以做个参考。

 

引用 using ESRI.ArcGIS.Geoprocessor;

(1)输入路径


private bool Excute()
{
bool result = true;
ESRI.ArcGIS.AnalysisTools.Intersect intersect = new ESRI.ArcGIS.AnalysisTools.Intersect();
intersect.in_features =
txtlayer1.Text+";"+txtlayer2.Text;
intersect.out_feature_class = CheckFileName(_outfilepath);
Geoprocessor geoProcessor = new Geoprocessor();
try
{
geoProcessor.Execute(intersect, null);
}
catch(Exception ex)
{
result = false;
}
return result;
}

(2)输入featureclass

Geoprocessor geoprocessor = new Geoprocessor();
geoprocessor.OverwriteOutput = true;
ESRI.ArcGIS.AnalysisTools.Intersect intersect = new ESRI.ArcGIS.AnalysisTools.Intersect();
IGpValueTableObject gpValueTableObject = new GpValueTableObjectClass();//对两个要素类进行相交运算
gpValueTableObject.SetColumns(2);
object o1 = featureClass1;//输入IFeatureClass 1 
object o2 = featureClass2;//输入IFeatureClass 2 
gpValueTableObject.AddRow(ref o1);
gpValueTableObject.AddRow(ref o2);
intersect.in_features = gpValueTableObject;
intersect.out_feature_class = @"shp存放路径test.shp";
geoprocessor.Execute(intersect, null);

 

最后

以上就是坦率花生最近收集整理的关于调用gp工具-相交的全部内容,更多相关调用gp工具-相交内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(116)

评论列表共有 0 条评论

立即
投稿
返回
顶部