码迷,mamicode.com
首页 > 其他好文 > 详细

Arcengine裁剪分析

时间:2016-05-30 10:06:32      阅读:502      评论:0      收藏:0      [点我收藏+]

标签:

        private void StartClip(IFeatureLayer inputfeaturelayer, IFeatureClass cliplayerClass, IFeatureWorkspace pOutFeatureWorkSapce, string pOutFeatclsName)
        {

            Geoprocessor gp = new Geoprocessor();

            gp.OverwriteOutput = true;

            IFeatureClass inputfeatureclass = inputfeaturelayer.FeatureClass;
            //IFeatureClass clipfeatureclass = cliplayerClass.FeatureClass;
            IDataset dataset = inputfeatureclass as IDataset;
            //IWorkspace workspace = dataset.Workspace;
            //IFeatureWorkspace fworkspace = workspace as IFeatureWorkspace;
            IFields outfields = inputfeatureclass.Fields;
            IFeatureClass outfeatureclass = pOutFeatureWorkSapce.CreateFeatureClass(pOutFeatclsName, outfields, null, null, esriFeatureType.esriFTSimple, "Shape", "");
            ESRI.ArcGIS.AnalysisTools.Clip clipTool =
                new ESRI.ArcGIS.AnalysisTools.Clip(inputfeatureclass, cliplayerClass, outfeatureclass);
            gp.Execute(clipTool, null);
            IFeatureLayer outlayer = new FeatureLayerClass();
            outlayer.FeatureClass = outfeatureclass;
            outlayer.Name = outfeatureclass.AliasName;
            //将裁剪输出的加载到当前Mapcontrol上
            //pMap.AddLayer((ILayer)outlayer);

        }

 

Arcengine裁剪分析

标签:

原文地址:http://www.cnblogs.com/lee24789229/p/5541283.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!