当前位置:编程学习 > C#/ASP.NET >>

不知为啥,AE叠加分析时,result结果总为空

 ESRI.ArcGIS.Geoprocessor.Geoprocessor gp = new ESRI.ArcGIS.Geoprocessor.Geoprocessor();
            //OverwriteOutput为真时,输出图层会覆盖当前文件夹下的同名图层
            gp.OverwriteOutput = true;


            //设置参与叠置分析的多个对象
            object inputFeat = this.txtInputFeat.Text;
            object overlayFeat = this.txtOverlayFeat.Text;
            IGpValueTableObject pObject = new GpValueTableObjectClass();
            pObject.SetColumns(2);
            pObject.AddRow(ref inputFeat);
            pObject.AddRow(ref overlayFeat);

            //获取要素名称
            string str = System.IO.Path.GetFileName(this.txtInputFeat.Text);
            int index = str.LastIndexOf(".");
            string strName = str.Remove(index);

            //设置输出路径
            strOutputPath = txtOutputPath.Text;

            //叠置分析结果
            IGeoProcessorResult result = null;

            //创建叠置分析实例,执行叠置分析
            string strOverlay = cboOverLay.SelectedItem.ToString();
Intersect intersectTool = new Intersect();
                        //设置输入要素
                        intersectTool.in_features = pObject;
                        //设置输出路径
                        //strOutputPath = strName + "_" + "_intersect.shp";
                        //strOutputPath += strName + "_" + "_intersect.shp";
                        intersectTool.out_feature_class = strOutputPath;
                        intersectTool.join_attributes = "All";
                        //执行求交运算
                        result = gp.Execute(intersectTool, null) as IGeoProcessorResult;

result 一直为null,求解释啊 arcgis engine --------------------编程问答-------------------- result = gp.Execute(intersectTool, null) as IGeoProcessorResult;
 怎么写的啊? 断点更进去看看!
补充:.NET技术 ,  C#
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,