Engine中执行gp工具返回的要素图层如何获取?
2016-02-23 10:42
531 查看
来自:http://zhihu.esrichina.com.cn/?/question/12087
Engine中执行gp工具返回的【解决办法】:
需要用gpUtils.DecodeFeatureLayer方法将gp工具生成的图层先读取出来,如:
要素图层如何获取?比如make query layer工具
Engine中执行gp工具返回的【解决办法】:
需要用gpUtils.DecodeFeatureLayer方法将gp工具生成的图层先读取出来,如:
// Intialize the geoprocessor. Geoprocessor GP = new Geoprocessor(); // Intialize the MakeFeatureLayer tool. MakeFeatureLayer makefeaturelayer = new MakeFeatureLayer(); // Set up the GP tool parameters and run the tool. makefeaturelayer.in_features = @C:\gp\nfld.gdb\wells; makefeaturelayer.out_layer = Wells_Lyr; makefeaturelayer.where_clause = WELL_YIELD > 150; IGeoProcessorResult result = (IGeoProcessorResult)GP.Execute(makefeaturelayer, null); IFeatureClass fc; IQueryFilter qf; IGPUtilities gpUtils = new GPUtilitiesClass(); gpUtils.DecodeFeatureLayer(result.GetOutput(0), out fc, out qf); IFeatureCursor cursor = fc.Insert(true);
要素图层如何获取?比如make query layer工具
相关文章推荐
- 设计模式之单例模式
- 【SDOI2011】【BZOJ2244】拦截导弹
- 使用SDwebImage缓存图片并在断网时候显示
- Gradle:Plugin is too old,please update to a more recent version
- 74. Search a 2D Matrix
- <<Android源码设计模式解析与实战>>读书笔记----- Android NDK开发学习
- 【Git学习笔记】Git常用命令总结
- 为什么你应该(从现在开始就)写博客 --via刘未鹏
- C++定义一个类,如果成员变量没有说明是共有还是私有那默认的是哪一个?
- 编程技巧
- 20160222深夜 支撑与阻力的问题,突破要不要买,回踩要不要接
- Android 编程下 Touch 事件的分发和消费机制
- 安卓闪屏java源代码
- C# ClipboardHelper (系统复制粘贴辅助工具)
- android.view.ViewConfiguration
- iOS 证书那些事
- Fragment之管理机制
- swift-基本操作01-赋值取余运算符
- C++ 容器map的使用
- Centos下yum安装PHP