/// <summary>
/// 合并
/// </summary>
/// <param name="pInputs"></param>
/// <param name="pOutput"></param>
static public void MergeAnalyze(List<string> pIn_featuresPath, string pOutput)
{
多参数输入
//IGpValueTableObject pGpValueTableObject = new GpValueTableObjectClass();
//pGpValueTableObject.SetColumns(2);
//object[] pObj = new object[pIn_featuresPath.Count];
//string[] pInString = pIn_featuresPath.ToArray();
//for (int i = 0; i < pIn_featuresPath.Count; i++)
//{
// pObj[i] = pInString[i];
//}
//for (int i = 0; i < pObj.Length; i++)
//{
// pGpValueTableObject.AddRow(ref pObj[i]);
//}
// 多路径(多参数)的拼接
string[] pInString = pIn_featuresPath.ToArray();
int strSize = pInString.Count();
String tempStr = "\"" + pIn_featuresPath[0] + "";
for (int i = 1; i < strSize - 1; i++)
{
tempStr += ";" + pIn_featuresPath[i] + "";
}
tempStr += ";" + pIn_featuresPath[strSize - 1] + "\"";
Geoprocessor GP = new Geoprocessor();
GP.OverwriteOutput = true;
ESRI.ArcGIS.DataManagementTools.Merge pMerge = new ESRI.ArcGIS.DataManagementTools.Merge();
pMerge.inputs = tempStr;
pMerge.output = pOutput;
RunTool(GP, pMerge);
}
引自:ArcEngine 调用GP里面的Merge工具 - agiser - 博客园
|