【ArcGIS Pro SDK】ArcGIS Pro SDK Geoprocessor

在ArcGIS Pro SDK(3.0)中仿 ArcGIS Engine 中的Geoprocessor、IGPProcess。

实现

  1. 3.0版本下的所有工具的生成,包括已过时的工具(1924个).
  2. 方法、参数、枚举的注释,翻译(目前只采用了官方翻译的内容)。
  3. 提供工具各自支持的环境变量设置。
  4. 参数是否可选特性,默认值。
  5. 必填参数的有参构造方法。
  6. 数据类型为字符串或布尔类型的参数新增了对应的枚举类。

待完善

  1. 目前已支持2.8、3.0版本的工具,有其他版本的需要请联系。

示例

using Baci.ArcGIS.ConversionTools;
using Baci.ArcGIS.Geoprocessor.DataManagementTools;

IGPResult result = (await new FeatureClassToFeatureClass(featureLayer,
    defaultGeodatabasePath,
    "OutputByFcToFcGPTool")
    .SetEnviroment(outputCoordinateSystem: 4490)
    .Run()).GPResult();

SelectLayerByAttribute tool = await new SelectLayerByAttribute(featureLayer)
{
    WhereClause = "objectid = 1",
    //枚举类型参数
    SelectionType = SelectLayerByAttribute.SelectionTypeEnum.New_selection.Value()
}.Run();
result = tool.GPResult();
//派生参数
Console.WriteLine(tool.Count);

仓库地址

https://github.com/baciZzz/ArcGIS-Pro-SDK-Geoprocessor

posted @ 2024-04-18 17:56  _baci  阅读(70)  评论(0)    收藏  举报