ArcGIS Engine中调用GP模型示例代码,如下:

            //1-定义GeoProcessor对象
            Geoprocessor gp = new Geoprocessor();
            object sev = null;
            //2-设置参数
            gp.OverwriteOutput = true;
            //3-设置工具箱所在的路径
            gp.AddToolbox(@"F:\lib_test\AirportsAndGolf.tbx");
            //4-设置输入参数
            IVariantArray parameters = new VarArrayClass();
            parameters.Add(@"F:\lib_test\地下水重金属数据.xls\Sheet1$");
            parameters.Add("`YEAR` = 2009");
            parameters.Add("W20111");
            parameters.Add(@"F:\lib_test\temp.gdb\tempwww");

            //5-执行工具
            gp.Execute("ModelAnalysis", parameters, null);

来自:http://www.gisall.com/html/41/9941-4617.html

相关文章:

  • 2021-06-12
  • 2021-09-09
  • 2022-12-23
  • 2022-12-23
  • 2021-06-22
  • 2021-11-25
  • 2022-12-23
  • 2021-11-27
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-23
  • 2021-09-06
  • 2022-12-23
  • 2022-01-27
  • 2021-11-06
相关资源
相似解决方案