调用gp工具时遇到 input参数有很多,怎么组织问题
1个回答
展开全部
代码:
C# code?
IFeatureLayer pFeLayer = axMapControl1.get_Layer(0) as IFeatureLayer;
IDataLayer idata = pFeLayer as IDataLayer;
IDatasetName idataname = idata.DataSourceName as IDatasetName;
string path = idataname.WorkspaceName.PathName;
Geoprocessor gp = new Geoprocessor();
gp.OverwriteOutput = true;
gp.SetEnvironmentValue("workspace", path);
CollectEvents collect = new CollectEvents(); collect.Input_Incident_Features = pFeLayer.FeatureClass;
collect.Output_Weighted_Point_Feature_Class = @"E:\collect.shp";
collect.Z_Max_Value = 10;
gp.Execute(collect, null)
C# code?
IFeatureLayer pFeLayer = axMapControl1.get_Layer(0) as IFeatureLayer;
IDataLayer idata = pFeLayer as IDataLayer;
IDatasetName idataname = idata.DataSourceName as IDatasetName;
string path = idataname.WorkspaceName.PathName;
Geoprocessor gp = new Geoprocessor();
gp.OverwriteOutput = true;
gp.SetEnvironmentValue("workspace", path);
CollectEvents collect = new CollectEvents(); collect.Input_Incident_Features = pFeLayer.FeatureClass;
collect.Output_Weighted_Point_Feature_Class = @"E:\collect.shp";
collect.Z_Max_Value = 10;
gp.Execute(collect, null)
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询