• 大小: 14.76 KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2024-11-08
  • 语言: 其他
  • 标签: 叠加  

资源简介

arcgis engine实现叠加分析,用到Intersect,

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ESRI.ArcGIS.Carto;
using ESRI.ArcGIS.esriSystem;
using ESRI.ArcGIS.Geodatabase;
//叠加分析

namespace InterSectAnalysis
{
    public class IntSectAnalysis
    {
        public IFeatureClass Intsect(IFeatureClass _pFtClassIFeatureClass _pFtOverlaystring _FilePathstring _pFileName)
        {
            /*IFeature pFea = ((IFeaturelayer)pSellayer).FeatureClass.Search(qf false).NextFeature();
            int numIndex = pFea.Fields.FindField(“aa“);
            IDataset ds = (IDataset)((IFeaturelayer)pSellayer).FeatureClass;
            IWorkspaceEdit pws = (IWorkspaceEdit)ds.Workspace;
            pws.StartEditing(false);
            pws.StartEditOperation();
            pFea.set_Value(numIndex values[“aa“].ToString().Trim());
            pFea.Store();
            pws.StopEditing(true);
            pws.StopEditOperation();  */

            IFeatureClassName pOutPut = new FeatureClassNameClass();
            pOutPut.ShapeType = _pFtClass.ShapeType;
            pOutPut.ShapeFieldName = _pFtClass.ShapeFieldName;
            pOutPut.FeatureType = esriFeatureType.esriFTSimple;
            IWorkspaceName pWsN = new WorkspaceNameClass();
            pWsN.WorkspaceFactoryProgID = “esriDataSourcesFile.ShapefileWorkspaceFactory“;
            pWsN.PathName = _FilePath;
            IDatasetName pDatasetName = pOutPut as IDatasetName;
            pDatasetName.Name = _pFileName;
            pDatasetName.WorkspaceName = pWsN;
            IBasicGeoprocessor pBasicGeo = new BasicGeoprocessorClass();
            IFeatureClass pFeatureClass = pBasicGeo.Intersect(_pFtClass as ITable false _pFtOverlay as ITablefalse0.1 pOutPut);
            return pFeatureClass;
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       1366  2013-06-13 13:39  InterSectAnalysis\InterSectAnalysis\Properties\AssemblyInfo.cs

     文件       4379  2013-06-17 14:03  InterSectAnalysis\InterSectAnalysis\InterSectAnalysis.csproj

     文件       5120  2013-06-18 10:50  InterSectAnalysis\InterSectAnalysis\bin\Debug\InterSectAnalysis.dll

     文件      11776  2013-06-18 10:50  InterSectAnalysis\InterSectAnalysis\bin\Debug\InterSectAnalysis.pdb

     文件      11776  2013-06-18 10:50  InterSectAnalysis\InterSectAnalysis\obj\Debug\InterSectAnalysis.pdb

     文件       5120  2013-06-18 10:50  InterSectAnalysis\InterSectAnalysis\obj\Debug\InterSectAnalysis.dll

     文件        544  2013-06-18 10:50  InterSectAnalysis\InterSectAnalysis\obj\Debug\InterSectAnalysis.csproj.FileListAbsolute.txt

     文件       1835  2013-06-18 10:49  InterSectAnalysis\InterSectAnalysis\InterSectAnalysis.cs

     文件        615  2013-06-18 10:50  InterSectAnalysis\InterSectAnalysis\Intsectanlysis2.cs

     文件        941  2013-06-13 17:42  InterSectAnalysis\InterSectAnalysis.sln

    ..A..H.     26112  2013-06-18 11:34  InterSectAnalysis\InterSectAnalysis.suo

     目录          0  2013-06-13 13:39  InterSectAnalysis\InterSectAnalysis\obj\Debug\TempPE

     目录          0  2013-06-13 13:39  InterSectAnalysis\InterSectAnalysis\obj\Debug\Refactor

     目录          0  2013-06-13 13:39  InterSectAnalysis\InterSectAnalysis\bin\Debug

     目录          0  2013-06-13 13:39  InterSectAnalysis\InterSectAnalysis\obj\Debug

     目录          0  2013-06-13 13:39  InterSectAnalysis\InterSectAnalysis\Properties

     目录          0  2013-06-13 13:39  InterSectAnalysis\InterSectAnalysis\bin

     目录          0  2013-06-13 13:39  InterSectAnalysis\InterSectAnalysis\obj

     目录          0  2013-06-13 13:39  InterSectAnalysis\InterSectAnalysis

     目录          0  2013-06-13 13:39  InterSectAnalysis

----------- ---------  ---------- -----  ----

                69584                    20


评论

共有 条评论