博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
调用GP服务进行裁剪
阅读量:6272 次
发布时间:2019-06-22

本文共 1287 字,大约阅读时间需要 4 分钟。

Geoprocessor gp = new Geoprocessor();            gp.OverwriteOutput = true;            IFeatureLayer inputfeaturelayer = pMap.get_Layer(0) as IFeatureLayer;            IFeatureLayer cliplayer = pMap.get_Layer(1) as IFeatureLayer;            IFeatureClass inputfeatureclass = inputfeaturelayer.FeatureClass;            IFeatureClass clipfeatureclass = cliplayer.FeatureClass;            IDataset dataset = inputfeatureclass as IDataset;            IWorkspace workspace = dataset.Workspace;            IFeatureWorkspace fworkspace = workspace as IFeatureWorkspace;            IFields outfields = inputfeatureclass.Fields;            IFeatureClass outfeatureclass = fworkspace.CreateFeatureClass("Clip_result", outfields, null, null, esriFeatureType.esriFTSimple, "Shape", "");            ESRI.ArcGIS.AnalysisTools.Clip clipTool =                new ESRI.ArcGIS.AnalysisTools.Clip(inputfeatureclass, clipfeatureclass, outfeatureclass);            gp.Execute(clipTool, null);            IFeatureLayer outlayer = new FeatureLayerClass();            outlayer.FeatureClass = outfeatureclass;            outlayer.Name = outfeatureclass.AliasName;            pMap.AddLayer((ILayer)outlayer);            axMapControlMain.ActiveView.Refresh();

 

转载于:https://www.cnblogs.com/leebokeyuan/p/5587588.html

你可能感兴趣的文章
2017-4-18 ADO.NET
查看>>
RSuite 一个基于 React.js 的 Web 组件库
查看>>
技术博客网址收藏
查看>>
python 金融分析学习
查看>>
授人以渔不如授人以鱼
查看>>
matlab练习程序(图像Haar小波变换)
查看>>
【Java】从域名得到ip
查看>>
Mysql索引会失效的几种情况分析
查看>>
LVM逻辑卷
查看>>
zoj3591 Nim(Nim博弈)
查看>>
canvas绘图
查看>>
poj - 3039 Margaritas on the River Walk
查看>>
bootstrap(5)关于导航
查看>>
Aptana插件在eclipse中安装
查看>>
jQuery-数据管理-删除事件
查看>>
下载器简单实例
查看>>
java实现分页工具类(JDBC)
查看>>
欧几里德算法与扩展欧几里德算法
查看>>
Tinkoff Internship Warmup Round 2018 and Codeforces Round #475 (Div. 2)
查看>>
通过kafka提供的命令来查看offset消费情况
查看>>